Skip to content
Permalink
Browse files

Block hints being triggered during preloading and opening the share i…

…nfo.

Closes framer/company#2235
  • Loading branch information...
eelco committed Jul 28, 2016
1 parent 9ff1da3 commit 39bf120c9c9c7f6b8115ad1aa5b9710ac7908b2f
Showing with 17 additions and 9 deletions.
  1. +2 −1 framer/Components/ShareComponent.coffee
  2. +15 −8 framer/Extras/Preloader.coffee
@@ -485,7 +485,8 @@ class ShareComponent
@sheet.onTouchEnd (event) -> event.stopPropagation()
@sheet.onTouchMove (event) -> event.stopPropagation()

@open.onClick =>
@open.onClick (event) =>
event.stopPropagation()
@_openSheet()

# When the window resizes evaluate if the sheet needs to be hidden
@@ -20,20 +20,26 @@ class Preloader extends BaseClass

@context = new Context({parent: parentContext, name: "Preloader"})

@hintBlocker = new Context({name: "Hint Blocker"})
@hintBlocker.index = 15000 # Above hints, below share info
@hintBlocker.run =>
blocker = new Layer
size : Canvas
backgroundColor : null
blocker.onTouchStart (event) ->
event.stopPropagation()
blocker.onTouchEnd (event) ->
event.stopPropagation()
blocker.onTouchMove (event) ->
event.stopPropagation()

@context.run =>

@cover = new Layer
frame: @context
backgroundColor: "white"
opacity: 0

@cover.onTouchStart (event) ->
event.stopPropagation()
@cover.onTouchEnd (event) ->
event.stopPropagation()
@cover.onTouchMove (event) ->
event.stopPropagation()

@progressIndicator = new CircularProgressComponent
size: 160
point: Align.center
@@ -141,7 +147,8 @@ class Preloader extends BaseClass
return unless @isLoading
@emit("end")
@_isLoading = false
@context.destroy()
@context?.destroy()
@hintBlocker?.destroy()

_handleProgress: =>
@emit("progress", @progress)

0 comments on commit 39bf120

Please sign in to comment.
You can’t perform that action at this time.