Skip to content

Commit

Permalink
Fix device images for file urls
Browse files Browse the repository at this point in the history
  • Loading branch information
koenbok committed Jul 28, 2016
1 parent 04a5d8c commit 4daa11b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions framer/Components/DeviceComponent.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,10 @@ class exports.DeviceComponent extends BaseClass
# We want to get these image from our public resources server
resourceUrl = "//resources.framerjs.com/static/DeviceResources"

# If we are running a local copy of Framer from the drive, get the resource online
if Utils.isFileUrl(window.location.href)
resourceUrl = "http://#{resourceUrl}"

# If we're running Framer Studio and have local files, we'd like to use those.
# For now we always use jp2 inside framer stusio
if Utils.isFramerStudio() and window.FramerStudioInfo
Expand Down Expand Up @@ -560,6 +564,10 @@ class exports.DeviceComponent extends BaseClass
# We want to get these image from our public resources server
resourceUrl = "//resources.framerjs.com/static/DeviceResources"

# If we are running a local copy of Framer from the drive, get the resource online
if Utils.isFileUrl(window.location.href)
resourceUrl = "http://#{resourceUrl}"

# If we're running Framer Studio and have local files, we'd like to use those
if Utils.isFramerStudio() and window.FramerStudioInfo and Utils.framerStudioVersion() >= newDeviceMinVersion
resourceUrl = window.FramerStudioInfo.deviceImagesUrl
Expand Down

0 comments on commit 4daa11b

Please sign in to comment.