From 336047be4b6a13ad6a3323be88fecfa8390ef9cc Mon Sep 17 00:00:00 2001 From: Floris Verloop Date: Wed, 27 Jul 2016 11:27:01 +0200 Subject: [PATCH 01/12] Hide date when previewing locally --- framer/Components/ShareComponent.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framer/Components/ShareComponent.coffee b/framer/Components/ShareComponent.coffee index ba2c69dad..7b4729ae0 100644 --- a/framer/Components/ShareComponent.coffee +++ b/framer/Components/ShareComponent.coffee @@ -68,7 +68,7 @@ class ShareComponent @_renderCTA() @_renderInfo() @_renderDescription() if @shareInfo.description - @_renderDate() + @_renderDate() if @shareInfo.openInFramerURL @_renderButtons() if @shareInfo.openInFramerURL # Evaluate content and set height accordingly From 2524350badd785f28f76026291485c65d71b65b1 Mon Sep 17 00:00:00 2001 From: Floris Verloop Date: Wed, 27 Jul 2016 11:33:26 +0200 Subject: [PATCH 02/12] Remove "@" from twitter value --- extras/Studio.framer/app.coffee | 4 ++-- framer/Components/ShareComponent.coffee | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/extras/Studio.framer/app.coffee b/extras/Studio.framer/app.coffee index b7e91578d..7dceb087d 100644 --- a/extras/Studio.framer/app.coffee +++ b/extras/Studio.framer/app.coffee @@ -2,8 +2,8 @@ Framer.Extras.ShareInfo.enable() # Activate Module Framer.Metadata = - author: "Eelco Lempsink" - twitter: "eelco" +# author: "Eelco Lempsink" + twitter: "@eelco" title: "MIDI Controller" description: """ Our goal with Framer has always been to build a full service design tool. So while it’s been possible to view working prototypes on a mobile browser, the experience has been less than seamless. diff --git a/framer/Components/ShareComponent.coffee b/framer/Components/ShareComponent.coffee index 7b4729ae0..7f0c0f5bc 100644 --- a/framer/Components/ShareComponent.coffee +++ b/framer/Components/ShareComponent.coffee @@ -59,6 +59,7 @@ class ShareComponent fixed: false maxDescriptionLength: 135 + @_checkData() @render() @_startListening() @@ -79,6 +80,11 @@ class ShareComponent Utils.delay .1, => @_calculateAvailableSpace() + _checkData: -> + # Twitter handle + if @shareInfo.twitter.charAt(0) is "@" + @shareInfo.twitter = @shareInfo.twitter.substring(1) + # Render main sheet _renderSheet: -> @sheet = new Layer From a5bdfd8e2e78cc4a45f998fb0d1f14a917edfdba Mon Sep 17 00:00:00 2001 From: Floris Verloop Date: Wed, 27 Jul 2016 11:41:30 +0200 Subject: [PATCH 03/12] Hide date when it's not available --- extras/Studio.framer/app.coffee | 2 +- framer/Components/ShareComponent.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extras/Studio.framer/app.coffee b/extras/Studio.framer/app.coffee index 7dceb087d..8733238bd 100644 --- a/extras/Studio.framer/app.coffee +++ b/extras/Studio.framer/app.coffee @@ -3,7 +3,7 @@ Framer.Extras.ShareInfo.enable() # Activate Module Framer.Metadata = # author: "Eelco Lempsink" - twitter: "@eelco" + twitter: "@benjamindenboer" title: "MIDI Controller" description: """ Our goal with Framer has always been to build a full service design tool. So while it’s been possible to view working prototypes on a mobile browser, the experience has been less than seamless. diff --git a/framer/Components/ShareComponent.coffee b/framer/Components/ShareComponent.coffee index 7f0c0f5bc..cdf839223 100644 --- a/framer/Components/ShareComponent.coffee +++ b/framer/Components/ShareComponent.coffee @@ -69,7 +69,7 @@ class ShareComponent @_renderCTA() @_renderInfo() @_renderDescription() if @shareInfo.description - @_renderDate() if @shareInfo.openInFramerURL + @_renderDate() if @shareInfo.openInFramerURL and @shareInfo.date @_renderButtons() if @shareInfo.openInFramerURL # Evaluate content and set height accordingly From 0ff84dc1e63581bea77aa874dbc5e2019b5717b3 Mon Sep 17 00:00:00 2001 From: Floris Verloop Date: Wed, 27 Jul 2016 11:59:09 +0200 Subject: [PATCH 04/12] Add social sharing links --- extras/Studio.framer/app.coffee | 3 +-- framer/Components/ShareComponent.coffee | 6 ++++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/extras/Studio.framer/app.coffee b/extras/Studio.framer/app.coffee index 8733238bd..3c9688602 100644 --- a/extras/Studio.framer/app.coffee +++ b/extras/Studio.framer/app.coffee @@ -12,5 +12,4 @@ Framer.Metadata = Framer for iOS features live preview, offline use and intuitive sharing features that are protected by secure links. Paired with Framer for Mac, you now have access to a full mobile prototyping toolkit. """ - date: "Jun 14 2016" - local: false \ No newline at end of file + date: "Jun 14 2016" \ No newline at end of file diff --git a/framer/Components/ShareComponent.coffee b/framer/Components/ShareComponent.coffee index cdf839223..e0d142bd4 100644 --- a/framer/Components/ShareComponent.coffee +++ b/framer/Components/ShareComponent.coffee @@ -340,7 +340,7 @@ class ShareComponent backgroundColor: "00AAFF" @buttonFacebook = new Button - url: "http://www.facebook.com" + url: "https://www.facebook.com/sharer/sharer.php?u=#{window.location.href}" parent: @buttons borderWidth: 1 borderColor: "#D5D5D5" @@ -359,7 +359,9 @@ class ShareComponent backgroundImage: "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAABGdBTUEAALGPC/xhBQAAAO1JREFUOBFjZMABWltbJX///l0GlDYAYg1GRkZxIP3n////P4E0EyOQwABNTU05QAVtQMyLIQkVwNDY3Nzs9vfv3524NMDEmWAMED1z5kyuf//+zUEWw8VG0fjq1SsnoPNkcSlGFmdB5gA16SHzQWxgoPxnZma2UVNTOxkWFvYXJo+uUQwmAaOBhn2tqak5BuPDaBSnAhXJwySQaB4kNpyJohEoqgCXIcAgWyNjQ0PDfwKGY0gDA+w5uo0YirAJAMPiLFkagTaeIUsjExMTeTaCNGIkcmyBBRTDUEeWU0EBNqoRW7KBio0GDi0CBwAHJ0YrwGtXbwAAAABJRU5ErkJggg==')" @buttonTwitter = new Button - url: "http://www.twitter.com" + url: """ + https://twitter.com/home?status=Check%20out%20my%20design%20made%20in%20%40framerjs%20%E2%80%94%20#{window.location.href} + """ parent: @buttons borderWidth: 1 borderColor: "#D5D5D5" From e8f2fb1c690de7b3ffb2fa5052cfa054755859b0 Mon Sep 17 00:00:00 2001 From: Floris Verloop Date: Wed, 27 Jul 2016 12:17:36 +0200 Subject: [PATCH 05/12] Truncate long titles --- framer/Components/ShareComponent.coffee | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/framer/Components/ShareComponent.coffee b/framer/Components/ShareComponent.coffee index e0d142bd4..8adc8ef66 100644 --- a/framer/Components/ShareComponent.coffee +++ b/framer/Components/ShareComponent.coffee @@ -81,10 +81,17 @@ class ShareComponent @_calculateAvailableSpace() _checkData: -> + # Twitter handle - if @shareInfo.twitter.charAt(0) is "@" + if @shareInfo.twitter and @shareInfo.twitter.charAt(0) is "@" @shareInfo.twitter = @shareInfo.twitter.substring(1) + # Truncate title if too long + if @shareInfo.twitter and @shareInfo.title.length > 26 + @shareInfo.title = @shareInfo.title.substr(0, 25).trim() + "…" + else if @shareInfo.title.length > 34 + @shareInfo.title = @shareInfo.title.substr(0, 33).trim() + "…" + # Render main sheet _renderSheet: -> @sheet = new Layer @@ -180,12 +187,13 @@ class ShareComponent @credentialsTitle = new ShareLayer parent: @credentials - width: @credentials.width - 50 height: 18 html: @shareInfo.title or fallbackTitle style: fontWeight: "500" + @credentialsTitle.width = @credentials - 50 if @shareInfo.twitter + # Check what info is available and render layers accordingly showAuthor = (content = @shareInfo.author) => @credentials.height = 40 @@ -193,13 +201,13 @@ class ShareComponent @credentialsAuthor = new ShareLayer parent: @credentials - width: @credentials.width - 50 html: content y: @credentialsTitle.maxY height: 18 style: color: "#808080" + @credentialsAuthor.width = @credentials - 50 if @shareInfo.twitter @_showPointer(@credentialsAuthor) # Check if avatar is available From 488795d50e6aeeaba4a31ded0209086b0a02ce8d Mon Sep 17 00:00:00 2001 From: Floris Verloop Date: Wed, 27 Jul 2016 12:32:19 +0200 Subject: [PATCH 06/12] Cleaner truncate, make collapse work locally --- extras/Studio.framer/app.coffee | 4 ++-- extras/Studio.framer/framer/config.json | 7 +++---- framer/Components/ShareComponent.coffee | 28 ++++++++++++++++++------- 3 files changed, 25 insertions(+), 14 deletions(-) diff --git a/extras/Studio.framer/app.coffee b/extras/Studio.framer/app.coffee index 3c9688602..da76627c6 100644 --- a/extras/Studio.framer/app.coffee +++ b/extras/Studio.framer/app.coffee @@ -3,8 +3,8 @@ Framer.Extras.ShareInfo.enable() # Activate Module Framer.Metadata = # author: "Eelco Lempsink" - twitter: "@benjamindenboer" - title: "MIDI Controller" + twitter: "@fverloop" + title: "Here's a long af title is long seri" description: """ Our goal with Framer has always been to build a full service design tool. So while it’s been possible to view working prototypes on a mobile browser, the experience has been less than seamless. diff --git a/extras/Studio.framer/framer/config.json b/extras/Studio.framer/framer/config.json index 9600975fb..8931c9db7 100644 --- a/extras/Studio.framer/framer/config.json +++ b/extras/Studio.framer/framer/config.json @@ -5,13 +5,12 @@ "deviceOrientation" : 0, "sharedPrototype" : 1, "contentScale" : 1, - "deviceType" : "apple-iphone-6s-silver", + "deviceType" : "fullscreen", "selectedHand" : "iphone-hands-2", "updateDelay" : 0.3, - "deviceScale" : "fit", + "deviceScale" : 1, "foldedCodeRanges" : [ ], - "orientation" : 0, - "fullScreen" : false + "orientation" : 0 } \ No newline at end of file diff --git a/framer/Components/ShareComponent.coffee b/framer/Components/ShareComponent.coffee index 8adc8ef66..779e70339 100644 --- a/framer/Components/ShareComponent.coffee +++ b/framer/Components/ShareComponent.coffee @@ -87,10 +87,13 @@ class ShareComponent @shareInfo.twitter = @shareInfo.twitter.substring(1) # Truncate title if too long + truncate = (str, n) -> + str.substr(0, n-1).trim() + "…" + if @shareInfo.twitter and @shareInfo.title.length > 26 - @shareInfo.title = @shareInfo.title.substr(0, 25).trim() + "…" + @shareInfo.title = truncate(@shareInfo.title, 26) else if @shareInfo.title.length > 34 - @shareInfo.title = @shareInfo.title.substr(0, 33).trim() + "…" + @shareInfo.title = truncate(@shareInfo.title, 34) # Render main sheet _renderSheet: -> @@ -299,8 +302,10 @@ class ShareComponent @description.height = @descriptionSize.height @description.html = parseDescription(@shareInfo.description) - @date.y = @description.maxY + 16 - @buttons.y = @date.maxY + 20 + if @shareInfo.openInFramerURL + @date.y = @description.maxY + 16 + @buttons.y = @date.maxY + 20 + @_updateHeight() @_calculateAvailableSpace() @@ -331,7 +336,6 @@ class ShareComponent @description.height = @descriptionSize.height @description.html = parseDescription(@shareInfo.description) - _renderButtons: -> @buttons = new ShareLayer height: 33 @@ -412,13 +416,21 @@ class ShareComponent @sheet.height = canvasHeight # Make the description scrollable - verticalSpace = @sheet.height - @cta.height - @credentials.height - @buttons.height - @date.height - 95 + verticalSpace = @sheet.height - @cta.height - @credentials.height + + if @shareInfo.openInFramerURL + verticalSpace -= @buttons.height + verticalSpace -= @date.height + verticalSpace -= 95 + else + verticalSpace -= 36 @description.height = verticalSpace @description.style.overflow = "scroll" - @date.y = @description.maxY + 20 - @buttons.y = @date.maxY + 20 + if @shareInfo.openInFramerURL + @date.y = @description.maxY + 20 + @buttons.y = @date.maxY + 20 if @description and canvasHeight > @sheet.maxHeight @sheet.height = @sheet.maxHeight From 694f4fa6745f118f7380d6474b4c46f7854435d8 Mon Sep 17 00:00:00 2001 From: Floris Verloop Date: Wed, 27 Jul 2016 13:56:33 +0200 Subject: [PATCH 07/12] Prominent hover state with fade --- framer/Components/ShareComponent.coffee | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/framer/Components/ShareComponent.coffee b/framer/Components/ShareComponent.coffee index 779e70339..49c62b892 100644 --- a/framer/Components/ShareComponent.coffee +++ b/framer/Components/ShareComponent.coffee @@ -36,12 +36,17 @@ class Button extends ShareLayer @props = _.merge(defaultProps, options) + @states.add hover: opacity: .8 + @states.animationOptions = + time: .3 + @onMouseOver -> @style.cursor = "pointer" - @opacity = .9 + @states.switch('hover') @onMouseOut -> @opacity = 1 + @states.switch('default') @onClick -> window.open(options.url) @@ -57,7 +62,7 @@ class ShareComponent minAvailableSpace: 300 minAvailableSpaceFullScreen: 500 fixed: false - maxDescriptionLength: 135 + maxDescriptionLength: 145 @_checkData() @render() From 77b58d4082499d4c43653e310bcc78dd2d1123b5 Mon Sep 17 00:00:00 2001 From: Floris Verloop Date: Wed, 27 Jul 2016 14:34:57 +0200 Subject: [PATCH 08/12] Make text selectable, detect click, make links work, open in new tab --- extras/Studio.framer/app.coffee | 2 +- framer/Components/ShareComponent.coffee | 42 ++++++++++++++++++++----- 2 files changed, 35 insertions(+), 9 deletions(-) diff --git a/extras/Studio.framer/app.coffee b/extras/Studio.framer/app.coffee index da76627c6..57ed84969 100644 --- a/extras/Studio.framer/app.coffee +++ b/extras/Studio.framer/app.coffee @@ -2,7 +2,7 @@ Framer.Extras.ShareInfo.enable() # Activate Module Framer.Metadata = -# author: "Eelco Lempsink" + author: "Eelco Lempsink" twitter: "@fverloop" title: "Here's a long af title is long seri" description: """ diff --git a/framer/Components/ShareComponent.coffee b/framer/Components/ShareComponent.coffee index 49c62b892..ea877309a 100644 --- a/framer/Components/ShareComponent.coffee +++ b/framer/Components/ShareComponent.coffee @@ -6,15 +6,13 @@ class ShareLayer extends Layer defaultProps = backgroundColor: null width: options.parent.width if options and options.parent + ignoreEvents: false style: fontFamily: "Roboto, Helvetica Neue, Helvetica, Arial, sans-serif" fontSize: "14px" color: "#111" - webkitUserSelect: "text" lineHeight: "1" webkitFontSmoothing: "antialiased"; - webkitUserSelect: "text" - userSelect: "text" @props = _.merge(defaultProps, options) @@ -25,6 +23,7 @@ class Button extends ShareLayer defaultProps = height: 33 + ignoreEvents: false style: fontFamily: "Roboto, Helvetica Neue, Helvetica, Arial, sans-serif" fontWeight: "500" @@ -48,7 +47,7 @@ class Button extends ShareLayer @opacity = 1 @states.switch('default') - @onClick -> window.open(options.url) + @onClick -> window.open(options.url, "_blank") # Share component class ShareComponent @@ -170,14 +169,20 @@ class ShareComponent textAlign: "center" fontSize: "18px" - ctaLink = new ShareLayer + @_enableUserSelect(ctaSlogan) + + ctaLink = new Button + url: "http://www.framerjs.com" parent: @cta y: ctaSlogan.y + 24 - height: 30 + height: 16 + width: 120 + x: Align.center() html: "Try it for free now" style: textAlign: "center" color: "#00AAFF" + padding: 0; # Render info section _renderInfo: -> @@ -200,6 +205,7 @@ class ShareComponent style: fontWeight: "500" + @_enableUserSelect(@credentialsTitle) @credentialsTitle.width = @credentials - 50 if @shareInfo.twitter # Check what info is available and render layers accordingly @@ -215,6 +221,7 @@ class ShareComponent style: color: "#808080" + @_enableUserSelect(@credentialsAuthor) @credentialsAuthor.width = @credentials - 50 if @shareInfo.twitter @_showPointer(@credentialsAuthor) @@ -244,7 +251,7 @@ class ShareComponent # If author name isn't available, fallback to Twitter handle name = if @shareInfo.author then @shareInfo.author else "@#{@shareInfo.twitter}" - showAuthor("#{name}") + showAuthor("#{name}") # If there's no twitter handle, show plain author name if @shareInfo.author and !@shareInfo.twitter @@ -267,6 +274,12 @@ class ShareComponent color: "#999" letterSpacing: ".2px" + _enableUserSelect: (layer) -> + + if !layer.html then layer.html = "" + layer._elementHTML.style["-webkit-user-select"] = "auto" + layer._elementHTML.style["cursor"] = "auto" + _renderDescription: -> # See if there are any url's in the description and wrap them in anchor tags. Make sure linebreaks are wrapped in
's.' @@ -288,6 +301,8 @@ class ShareComponent wordWrap: "break-word" color: "#111" + @_enableUserSelect(@description) + descriptionStyle = fontSize: "14px" fontFamily: "Roboto" @@ -335,8 +350,19 @@ class ShareComponent @description.html = parseDescription(@options.shortDescription) @_showPointer(@description) - @description.onClick -> showFullDescription() + mouseStartX = 0 + mouseStartY = 0 + + # Selecting text also triggers a click event to counter this + # we compare the TapStart and TapEnd positions + @description.onTapStart (event) -> + mouseStartX = event.x + mouseStartY = event.y + + @description.onTapEnd (event) -> + if mouseStartX is event.x and mouseStartY is event.y + showFullDescription() else @description.height = @descriptionSize.height @description.html = parseDescription(@shareInfo.description) From 46211097a5062b0edaac62e5be73eadf631eeec7 Mon Sep 17 00:00:00 2001 From: Floris Verloop Date: Wed, 27 Jul 2016 15:27:36 +0200 Subject: [PATCH 09/12] urls are now checked on HTTP/HTTPS and are clickable --- extras/Studio.framer/app.coffee | 2 +- framer/Components/ShareComponent.coffee | 34 +++++++++++++++++-------- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/extras/Studio.framer/app.coffee b/extras/Studio.framer/app.coffee index 57ed84969..b56154097 100644 --- a/extras/Studio.framer/app.coffee +++ b/extras/Studio.framer/app.coffee @@ -8,7 +8,7 @@ Framer.Metadata = description: """ Our goal with Framer has always been to build a full service design tool. So while it’s been possible to view working prototypes on a mobile browser, the experience has been less than seamless. - Then, our community came to the rescue. Both Frameless by Jay Stakelon and Frames by Rafael Conde set a new standard for mobile viewing of prototypes. Inspired by their work and your feedback, we are now launching an iOS app that fully rounds out your design experience. + Then, our community came to the rescue. Both Frameless by Jay Stakelon and Frames by Rafael Conde set a new standard for mobile viewing of prototypes. Inspired by their work and your feedback, we are now launching an iOS app that fully rounds out your design experience framerjs.com. Framer for iOS features live preview, offline use and intuitive sharing features that are protected by secure links. Paired with Framer for Mac, you now have access to a full mobile prototyping toolkit. """ diff --git a/framer/Components/ShareComponent.coffee b/framer/Components/ShareComponent.coffee index ea877309a..a4450f455 100644 --- a/framer/Components/ShareComponent.coffee +++ b/framer/Components/ShareComponent.coffee @@ -284,15 +284,23 @@ class ShareComponent # See if there are any url's in the description and wrap them in anchor tags. Make sure linebreaks are wrapped in
's.' parseDescription = (text) -> - urlRegex = /(https?:\/\/[^\s]+)/g + urlRegex = /[-a-zA-Z0-9@:%_\+.~#?&//=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?/gi + httpRegex = /^((http|https):\/\/)/ lineBreakRegex = /(?:\r\n|\r|\n)/g urlified = text.replace urlRegex, (url) -> - '' + url + '' + + if !httpRegex.test(url) + href = "//#{url}" + else + href = url + + "#{url}" urlified.replace lineBreakRegex, '
' @description = new Layer + ignoreEvents: false parent: @info y: @credentials.maxY + 10 backgroundColor: null @@ -315,6 +323,14 @@ class ShareComponent {width: "#{@description.width}"} ) + descriptionClickRegister = (e) -> + @descriptionStartX = e.x + @descriptionStartY = e.y + + descriptionClickCompare = (e) -> + if @descriptionStartX is e.x and @descriptionStartY is e.y + showFullDescription() + showFullDescription = => @options.truncated = false @@ -333,6 +349,9 @@ class ShareComponent @description.style = cursor: "default" + @description.off Events.TapStart, descriptionClickRegister + @description.off Events.TapEnd, descriptionClickCompare + if @shareInfo.description.length > @options.maxDescriptionLength @options.truncated = true @@ -351,18 +370,11 @@ class ShareComponent @_showPointer(@description) - mouseStartX = 0 - mouseStartY = 0 - # Selecting text also triggers a click event to counter this # we compare the TapStart and TapEnd positions - @description.onTapStart (event) -> - mouseStartX = event.x - mouseStartY = event.y + @description.on Events.TapStart, descriptionClickRegister + @description.on Events.TapEnd, descriptionClickCompare - @description.onTapEnd (event) -> - if mouseStartX is event.x and mouseStartY is event.y - showFullDescription() else @description.height = @descriptionSize.height @description.html = parseDescription(@shareInfo.description) From d0e96924926ea99c7827ad1a64d84638eda3ac7a Mon Sep 17 00:00:00 2001 From: Floris Verloop Date: Wed, 27 Jul 2016 15:32:30 +0200 Subject: [PATCH 10/12] Add campaign link --- framer/Components/ShareComponent.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/framer/Components/ShareComponent.coffee b/framer/Components/ShareComponent.coffee index a4450f455..d546a53f3 100644 --- a/framer/Components/ShareComponent.coffee +++ b/framer/Components/ShareComponent.coffee @@ -172,7 +172,7 @@ class ShareComponent @_enableUserSelect(ctaSlogan) ctaLink = new Button - url: "http://www.framerjs.com" + url: "http://framerjs.com/?utm_source=share.framerjs.com&utm_medium=banner&utm_campaign=product" parent: @cta y: ctaSlogan.y + 24 height: 16 @@ -349,6 +349,7 @@ class ShareComponent @description.style = cursor: "default" + # Remove events when description is shown to make links clickable @description.off Events.TapStart, descriptionClickRegister @description.off Events.TapEnd, descriptionClickCompare From 1a4c7cbe5acac87936ad170503722aedc9d1b60b Mon Sep 17 00:00:00 2001 From: Floris Verloop Date: Wed, 27 Jul 2016 16:00:14 +0200 Subject: [PATCH 11/12] Hide on mobile --- framer/Components/ShareComponent.coffee | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/framer/Components/ShareComponent.coffee b/framer/Components/ShareComponent.coffee index d546a53f3..a149e48f5 100644 --- a/framer/Components/ShareComponent.coffee +++ b/framer/Components/ShareComponent.coffee @@ -64,8 +64,7 @@ class ShareComponent maxDescriptionLength: 145 @_checkData() - @render() - @_startListening() + @render() if !Utils.isMobile() render: -> @_renderSheet() @@ -84,6 +83,8 @@ class ShareComponent Utils.delay .1, => @_calculateAvailableSpace() + @_startListening() + _checkData: -> # Twitter handle From f8a6d58b1d3b7a76ff6ae44a158a6b893bdb26c0 Mon Sep 17 00:00:00 2001 From: Eelco Lempsink Date: Thu, 28 Jul 2016 09:47:10 +0200 Subject: [PATCH 12/12] Rename Framer.Metadata to Framer.Info --- framer/Extras/ShareInfo.coffee | 2 +- framer/Framer.coffee | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/framer/Extras/ShareInfo.coffee b/framer/Extras/ShareInfo.coffee index 4288b120a..df860128c 100644 --- a/framer/Extras/ShareInfo.coffee +++ b/framer/Extras/ShareInfo.coffee @@ -10,7 +10,7 @@ class ShareInfo extends BaseClass Utils.delay 0, => @context.run -> - share = new ShareComponent(Framer.Metadata) + share = new ShareComponent(Framer.Info) destroy: -> @context.destroy() diff --git a/framer/Framer.coffee b/framer/Framer.coffee index 2a3a31364..a51a0fbf6 100644 --- a/framer/Framer.coffee +++ b/framer/Framer.coffee @@ -51,7 +51,8 @@ Framer.GestureInputRecognizer = new (require "./GestureInputRecognizer").Gesture Framer.Version = require "../build/Version" Framer.Loop = new Framer.AnimationLoop() -Framer.Metadata = {} +# Metadata +Framer.Info = {} window.Framer = Framer if window