Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Hide screen background when device is fullscreen
  • Loading branch information
nvh committed Nov 8, 2017
1 parent 76769d6 commit 9dd8b13
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions framer/Components/DeviceComponent.coffee
Expand Up @@ -161,6 +161,8 @@ class exports.DeviceComponent extends BaseClass
if @deviceType isnt "fullscreen" or Utils.isMobile() if @deviceType isnt "fullscreen" or Utils.isMobile()
screenSizeChanged = screenSizeChanged or @_context.devicePixelRatio isnt window.devicePixelRatio screenSizeChanged = screenSizeChanged or @_context.devicePixelRatio isnt window.devicePixelRatio
@_context.devicePixelRatio = window.devicePixelRatio @_context.devicePixelRatio = window.devicePixelRatio
@screenBackground.visible = @deviceType isnt "fullscreen"

if Utils.isMobile() if Utils.isMobile()
@screenMask.visible = false @screenMask.visible = false
else else
Expand Down
5 changes: 5 additions & 0 deletions test/tests/DeviceComponentTest.coffee
Expand Up @@ -174,6 +174,11 @@ describe "DeviceComponent", ->
# Exceptions # Exceptions
assert(key in ["fullscreen", "custom", "sony-w85Oc", "test"], "#{key} should have a platform specified") assert(key in ["fullscreen", "custom", "sony-w85Oc", "test"], "#{key} should have a platform specified")


it "should hide the screen background when device is fullscreen", ->
device = new DeviceComponent()
device.deviceType = "fullscreen"
device.screenBackground.visible.should.equal false

describe.skip "when not showing bezel", -> describe.skip "when not showing bezel", ->
before -> before ->
Utils.isFramerStudio = -> Utils.isFramerStudio = ->
Expand Down

0 comments on commit 9dd8b13

Please sign in to comment.