Permalink
Browse files

Revert "Fix z position bug, thanks Fran"

This reverts commit f08d7f6.
  • Loading branch information...
koenbok committed Jun 8, 2015
1 parent f0e040f commit 21b9efa47475993037bc69fb569cd90a05d6f583
Showing with 5 additions and 4 deletions.
  1. +2 −1 framer/LayerStyle.coffee
  2. +3 −3 test/tests/LayerTest.coffee
View
@@ -81,6 +81,7 @@ exports.LayerStyle =
webkitTransform: (layer) ->
# We have a special rendering path for layers that prefer 2d rendering.
# This definitely decreases performance, but is handy in complex drawing
# scenarios with rounded corners and shadows where gpu drawing gets weird
@@ -90,6 +91,7 @@ exports.LayerStyle =
return exports.LayerStyle.webkitTransformForce2d(layer)
"
translate3d(#{layer._properties.x}px,#{layer._properties.y}px,#{layer._properties.z}px)
scale(#{layer._properties.scale})
scale3d(#{layer._properties.scaleX},#{layer._properties.scaleY},#{layer._properties.scaleZ})
skew(#{layer._properties.skew}deg,#{layer._properties.skew}deg)
@@ -98,7 +100,6 @@ exports.LayerStyle =
rotateX(#{layer._properties.rotationX}deg)
rotateY(#{layer._properties.rotationY}deg)
rotateZ(#{layer._properties.rotationZ}deg)
translate3d(#{layer._properties.x}px,#{layer._properties.y}px,#{layer._properties.z}px)
"
webkitTransformForce2d: (layer) ->
@@ -84,7 +84,7 @@ describe "Layer", ->
layer.y.should.equal 50
# layer.style.webkitTransform.should.equal "matrix(1, 0, 0, 1, 100, 0)"
layer.style.webkitTransform.should.equal "scale(1) scale3d(1, 1, 1) skew(0deg, 0deg) skewX(0deg) skewY(0deg) rotateX(0deg) rotateY(0deg) rotateZ(0deg) translate3d(100px, 50px, 0px)"
layer.style.webkitTransform.should.equal "translate3d(100px, 50px, 0px) scale(1) scale3d(1, 1, 1) skew(0deg, 0deg) skewX(0deg) skewY(0deg) rotateX(0deg) rotateY(0deg) rotateZ(0deg)"
it "should set scale", ->
@@ -95,7 +95,7 @@ describe "Layer", ->
layer.scaleZ = 100
# layer.style.webkitTransform.should.equal "matrix(1, 0, 0, 1, 100, 50)"
layer.style.webkitTransform.should.equal "scale(1) scale3d(100, 100, 100) skew(0deg, 0deg) skewX(0deg) skewY(0deg) rotateX(0deg) rotateY(0deg) rotateZ(0deg) translate3d(0px, 0px, 0px)"
layer.style.webkitTransform.should.equal "translate3d(0px, 0px, 0px) scale(1) scale3d(100, 100, 100) skew(0deg, 0deg) skewX(0deg) skewY(0deg) rotateX(0deg) rotateY(0deg) rotateZ(0deg)"
it "should set origin", ->
@@ -875,7 +875,7 @@ describe "Layer", ->
layer = new Layer
layer.style.webkitTransform.should.equal "scale(1) scale3d(1, 1, 1) skew(0deg, 0deg) skewX(0deg) skewY(0deg) rotateX(0deg) rotateY(0deg) rotateZ(0deg) translate3d(0px, 0px, 0px)"
layer.style.webkitTransform.should.equal "translate3d(0px, 0px, 0px) scale(1) scale3d(1, 1, 1) skew(0deg, 0deg) skewX(0deg) skewY(0deg) rotateX(0deg) rotateY(0deg) rotateZ(0deg)"
layer.force2d = true

0 comments on commit 21b9efa

Please sign in to comment.