Skip to content

Commit

Permalink
Limit the size of the HTML wrapper to the intrinsic size
Browse files Browse the repository at this point in the history
  • Loading branch information
eelco committed Jun 7, 2017
1 parent 7b8793e commit d511624
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions framer/Layer.coffee
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -817,6 +817,8 @@ class exports.Layer extends BaseClass
else else
@_elementHTML.style.transformOrigin = "0 0" @_elementHTML.style.transformOrigin = "0 0"
@_elementHTML.style.transform = "scale(#{@context.scale * @width / @htmlIntrinsicSize.width}, #{@context.scale * @height / @htmlIntrinsicSize.height})" @_elementHTML.style.transform = "scale(#{@context.scale * @width / @htmlIntrinsicSize.width}, #{@context.scale * @height / @htmlIntrinsicSize.height})"
@_elementHTML.style.width = "#{@htmlIntrinsicSize.width}px"
@_elementHTML.style.height = "#{@htmlIntrinsicSize.height}px"


querySelector: (query) -> @_element.querySelector(query) querySelector: (query) -> @_element.querySelector(query)
querySelectorAll: (query) -> @_element.querySelectorAll(query) querySelectorAll: (query) -> @_element.querySelectorAll(query)
Expand Down

0 comments on commit d511624

Please sign in to comment.