Skip to content

Instantly share code, notes, and snippets.

@darshilv
Created July 6, 2016 21:48
Show Gist options
  • Save darshilv/97b3f6d102a1d3732c82d91fa0c8f338 to your computer and use it in GitHub Desktop.
Save darshilv/97b3f6d102a1d3732c82d91fa0c8f338 to your computer and use it in GitHub Desktop.
# -------------------- Create the device
# deviceType can be either "phone" or "desktop"
Framer.DeviceView.Devices["custom"] =
"deviceType": "phone"
"screenWidth": 768
"screenHeight": 442
"deviceImage": "images/Modern_TV.png"
"deviceImageWidth": 800
"deviceImageHeight": 583
# Set custom device
Framer.Device.deviceType = "custom"
# -------------------- Some content
# Set background
bg = new BackgroundLayer backgroundColor: "#28affa"
bg.bringToFront()
# Create layer
layerA = new Layer
borderRadius: 8
backgroundColor: "#fff"
# Center layer
layerA.center()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment