Permalink
Browse files

Updated example

  • Loading branch information...
koenbok committed May 28, 2016
1 parent 3fba050 commit c28c4505d86ce44c57c6da255572e75de79cac0f
Showing with 17 additions and 59 deletions.
  1. +13 −56 extras/Studio.framer/app.coffee
  2. +4 −3 extras/Studio.framer/framer/config.json
@@ -1,6 +1,6 @@
if not Utils.isFramerStudio()
Framer.Extras.Preloader.enable()
Framer.Extras.Hints.enable()
nav = new NavComponent
@@ -13,59 +13,16 @@ grid = new GridComponent
nav.push(grid)
grid.renderCell = (layer) ->
layer.image = Utils.randomImage(layer)
# layer.onClick ->
#
# large = new Layer
# size: Utils.frameInset(nav, 80)
# image: @image
#
# large.onTap ->
# nav.back()
#
# nav.modal(large)
# photo = new Layer
# width: 1400
# height: 933
# image: "images/photo.jpg"
#
# photo.draggable.enabled = true
layer.image = Utils.randomImage(layer) + "?date=#{Date.now()}"
cover = new Layer
size: Screen
backgroundColor: Color.grey(0, 1)
progress = new CircularProgressComponent
parent: cover
point: Align.center()
progress.strokeWidth = 1
# progress.railsColor = Color.grey(1, 1)
# progress.progressColor = Color.grey(0, 0.5)
imageLayers = _.filter Framer.CurrentContext.layers, (layer) ->
layer.image
counter = 0
for imageLayer in imageLayers
Utils.loadImage imageLayer.image, ->
counter += 1
progress.setProgress counter / imageLayers.length
layer.onClick ->
large = new Layer
size: Utils.frameInset(nav, 80)
image: @image
large.onTap ->
nav.back()
if counter is imageLayers.length
cover.destroy()
# cover.animate
# properties:
# opacity: 0
# time: 0.4
# delay: 1.3
nav.modal(large)
@@ -5,12 +5,13 @@
"deviceOrientation" : 0,
"sharedPrototype" : 1,
"contentScale" : 1,
"deviceType" : "fullscreen",
"deviceType" : "apple-iphone-6s-gold",
"selectedHand" : "",
"updateDelay" : 0.3,
"deviceScale" : 1,
"deviceScale" : "fit",
"codeFolds" : [
],
"orientation" : 0
"orientation" : 0,
"fullScreen" : false
}

0 comments on commit c28c450

Please sign in to comment.