Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions jquery.transit.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@
// Allows you to rotate, scale and translate.
registerCssHook('scale');
registerCssHook('translate');
registerCssHook('translateZ');
registerCssHook('rotate');
registerCssHook('rotateX');
registerCssHook('rotateY');
Expand Down Expand Up @@ -355,6 +356,11 @@
if (y !== null && y !== undefined) { this._translateY = unit(y, 'px'); }

this.translate = this._translateX + "," + this._translateY;
},

// ### translateZ
translateZ: function(z) {
this.translateZ = unit(z, 'px');
}
},

Expand All @@ -367,6 +373,10 @@
return this._translateY || 0;
},

translateZ: function() {
return this.translateZ || 0;
},

scale: function() {
var s = (this.scale || "1,1").split(',');
if (s[0]) { s[0] = parseFloat(s[0]); }
Expand Down Expand Up @@ -409,6 +419,7 @@
if ((!support.transform3d) && (
(i === 'rotateX') ||
(i === 'rotateY') ||
(i === 'translateZ') ||
(i === 'perspective') ||
(i === 'transformOrigin'))) { continue; }

Expand Down Expand Up @@ -557,6 +568,9 @@
if (typeof duration === 'undefined') { duration = $.fx.speeds._default; }
if (typeof easing === 'undefined') { easing = $.cssEase._default; }

// Disable animation
if ($.fx.off) { duration = 0; }

duration = toMS(duration);

// Build the `transition` property.
Expand Down