Created
January 28, 2019 10:36
-
-
Save victorpanitz/f1f04c1d5ee54c0f53744de3a1c1b8d5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function layer(context, selectedLayer) { | |
let object = ''; | |
let result = {}; | |
let x = Math.floor(selectedLayer.rect.x); | |
let y = Math.floor(selectedLayer.rect.y); | |
let width = Math.floor(selectedLayer.rect.width); | |
let height = Math.floor(selectedLayer.rect.height); | |
let rect = "CGRect(x: " + x + ", y: " + y + ", width: " + width + ", height: "+ height + ")"; | |
object += rect; | |
result = { | |
code: object, | |
language: 'swift' | |
}; | |
return { | |
code: object, | |
language: 'swift' | |
}; | |
} | |
export default { | |
layer | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment