From b32a2da2ca7d37da99c6a4251de2ed1d119c997e Mon Sep 17 00:00:00 2001 From: Rolf Schmidt Date: Wed, 14 Sep 2016 15:05:44 +0200 Subject: [PATCH] Improved display of preview for ultra large monitors. --- .../javascripts/app/controllers/_channel/chat.coffee | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/app/controllers/_channel/chat.coffee b/app/assets/javascripts/app/controllers/_channel/chat.coffee index 7b64d7423..a08dcab2b 100644 --- a/app/assets/javascripts/app/controllers/_channel/chat.coffee +++ b/app/assets/javascripts/app/controllers/_channel/chat.coffee @@ -105,6 +105,7 @@ class App.ChannelChat extends App.ControllerContent isOpen: true browserWidth: 1280 + browserWidthMax: 1280 previewUrl: '' previewScale: 1 @@ -192,11 +193,15 @@ class App.ChannelChat extends App.ControllerContent return if @browserWidth is 'fit' - if width < @el.width() + if width < @el.width() && width == 375 @chat.addClass('is-fullscreen').css 'transform', "translateY(#{ @getChatOffset(true) }px)" @browser.css('width', "#{ width }px") else - @previewScale = @el.width()/width + if @el.width() > width && width == @browserWidthMax + @previewScale = 1 + else + @previewScale = @el.width()/width + @chat.css 'transform', "translateY(#{ @getChatOffset() * @previewScale }px) scale(#{ @previewScale })" @website.css transform: "scale(#{ @previewScale })"