From bf4301cb98d8517bda431ce4c0fe3d9517708911 Mon Sep 17 00:00:00 2001 From: Felix Niklas Date: Mon, 23 Nov 2015 15:23:28 +0100 Subject: [PATCH] chat designer: fix demo browser transition from iphone to macbook --- .../javascripts/app/controllers/_channel/chat.coffee | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/assets/javascripts/app/controllers/_channel/chat.coffee b/app/assets/javascripts/app/controllers/_channel/chat.coffee index de7a861a3..545328420 100644 --- a/app/assets/javascripts/app/controllers/_channel/chat.coffee +++ b/app/assets/javascripts/app/controllers/_channel/chat.coffee @@ -11,7 +11,6 @@ class App.ChannelChat extends App.Controller 'click .js-selectBrowserWidth': 'selectBrowserWidth' elements: - '.js-demo': 'demo' '.js-browser': 'browser' '.js-iframe': 'iframe' '.js-chat': 'chat' @@ -142,16 +141,16 @@ class App.ChannelChat extends App.Controller return if value is 'fit' - if width < @demo.width() + if width < @el.width() @chat.addClass('is-fullscreen') @browser.css('width', "#{ width }px") else - percentage = @demo.width()/width + percentage = @el.width()/width @chat.css('transform', "scale(#{ percentage })") @iframe.css transform: "scale(#{ percentage })" - width: @demo.width() / percentage - height: @demo.height() / percentage + width: @el.width() / percentage + height: @el.height() / percentage changeDemoWebsite: (event) => event.preventDefault() if event