Skip to content

Commit

Permalink
reverse
Browse files Browse the repository at this point in the history
  • Loading branch information
dntzhang committed Apr 5, 2017
1 parent 3574250 commit 6fca319
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions transformjs/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,9 @@

function isElement(o) {
return (
typeof HTMLElement === "object" ? o instanceof HTMLElement : //DOM2
o && typeof o === "object" && o !== null && o.nodeType === 1 && typeof o.nodeName === "string"
);
typeof HTMLElement === "object" ? o instanceof HTMLElement : //DOM2
o && typeof o === "object" && o !== null && o.nodeType === 1 && typeof o.nodeName === "string"
);
}

function Transform(obj, notPerspective) {
Expand All @@ -240,7 +240,7 @@
if (!notPerspective) {
observeProps.push("perspective");
}

observe(
obj,
observeProps,
Expand All @@ -253,12 +253,10 @@
obj.transform = transform;
}
});

obj.matrix3d = new Matrix3D();
if (!notPerspective) {
if(!obj.hasOwnProperty('perspective')) {
obj.perspective = 500;
}
obj.perspective = 500;
}
obj.scaleX = obj.scaleY = obj.scaleZ = 1;
//由于image自带了x\y\z,所有加上translate前缀
Expand Down

0 comments on commit 6fca319

Please sign in to comment.