am I removing features? yes, it was a bad idea after all and I really hope that noone will notice ;)
This commit is contained in:
@@ -84,7 +84,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
var scale = function ( s ) {
|
var scale = function ( s ) {
|
||||||
return " scaleX(" + s.x + ") scaleY(" + s.y + ") scaleZ(" + s.z + ") ";
|
return " scale(" + s + ") ";
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK SUPPORT
|
// CHECK SUPPORT
|
||||||
@@ -142,7 +142,7 @@
|
|||||||
var current = {
|
var current = {
|
||||||
translate: { x: 0, y: 0, z: 0 },
|
translate: { x: 0, y: 0, z: 0 },
|
||||||
rotate: { x: 0, y: 0, z: 0 },
|
rotate: { x: 0, y: 0, z: 0 },
|
||||||
scale: { x: 1, y: 1, z: 1 }
|
scale: 1
|
||||||
};
|
};
|
||||||
|
|
||||||
steps.forEach(function ( el, idx ) {
|
steps.forEach(function ( el, idx ) {
|
||||||
@@ -158,11 +158,7 @@
|
|||||||
y: data.rotateY || 0,
|
y: data.rotateY || 0,
|
||||||
z: data.rotateZ || data.rotate || 0
|
z: data.rotateZ || data.rotate || 0
|
||||||
},
|
},
|
||||||
scale: {
|
scale: data.scale || 1
|
||||||
x: data.scaleX || data.scale || 1,
|
|
||||||
y: data.scaleY || data.scale || 1,
|
|
||||||
z: data.scaleZ || 1
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
el.stepData = step;
|
el.stepData = step;
|
||||||
@@ -228,24 +224,20 @@
|
|||||||
y: -parseInt(step.rotate.y, 10),
|
y: -parseInt(step.rotate.y, 10),
|
||||||
z: -parseInt(step.rotate.z, 10)
|
z: -parseInt(step.rotate.z, 10)
|
||||||
},
|
},
|
||||||
scale: {
|
|
||||||
x: 1 / parseFloat(step.scale.x),
|
|
||||||
y: 1 / parseFloat(step.scale.y),
|
|
||||||
z: 1 / parseFloat(step.scale.z)
|
|
||||||
},
|
|
||||||
translate: {
|
translate: {
|
||||||
x: -step.translate.x,
|
x: -step.translate.x,
|
||||||
y: -step.translate.y,
|
y: -step.translate.y,
|
||||||
z: -step.translate.z
|
z: -step.translate.z
|
||||||
}
|
},
|
||||||
|
scale: 1 / parseFloat(step.scale)
|
||||||
};
|
};
|
||||||
|
|
||||||
var zoomin = target.scale.x >= current.scale.x;
|
var zoomin = target.scale >= current.scale;
|
||||||
|
|
||||||
css(impress, {
|
css(impress, {
|
||||||
// to keep the perspective look similar for different scales
|
// to keep the perspective look similar for different scales
|
||||||
// we need to 'scale' the perspective, too
|
// we need to 'scale' the perspective, too
|
||||||
perspective: step.scale.x * 1000 + "px",
|
perspective: step.scale * 1000 + "px",
|
||||||
transform: scale(target.scale),
|
transform: scale(target.scale),
|
||||||
transitionDelay: (zoomin ? "500ms" : "0ms")
|
transitionDelay: (zoomin ? "500ms" : "0ms")
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user