Created
October 12, 2014 14:02
-
-
Save nicebarbarian/b46b5ce2a8329b08db75 to your computer and use it in GitHub Desktop.
framer.js: layered positioned in center
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
centeredLayer = new Layer | |
width: 200 | |
height: 200 | |
centeredLayer.center() | |
# Center it again on resizing the screen | |
window.onresize = -> centeredLayer.center() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment