Support data-transition-duration attributes for step elements.
If the next element has its own data-transition-duration attribute, use that value instead of the global setting. References: https://github.com/impress/impress.js/issues/142
This commit is contained in:
@@ -262,6 +262,9 @@
|
|||||||
z: lib.util.toNumber( data.rotateZ || data.rotate )
|
z: lib.util.toNumber( data.rotateZ || data.rotate )
|
||||||
},
|
},
|
||||||
scale: lib.util.toNumber( data.scale, 1 ),
|
scale: lib.util.toNumber( data.scale, 1 ),
|
||||||
|
transitionDuration: lib.util.toNumber(
|
||||||
|
data.transitionDuration, config.transitionDuration
|
||||||
|
),
|
||||||
el: el
|
el: el
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -416,6 +419,7 @@
|
|||||||
window.scrollTo( 0, 0 );
|
window.scrollTo( 0, 0 );
|
||||||
|
|
||||||
var step = stepsData[ "impress-" + el.id ];
|
var step = stepsData[ "impress-" + el.id ];
|
||||||
|
duration = ( duration !== undefined ? duration : step.transitionDuration );
|
||||||
|
|
||||||
// If we are in fact moving to another step, start with executing the registered
|
// If we are in fact moving to another step, start with executing the registered
|
||||||
// preStepLeave plugins.
|
// preStepLeave plugins.
|
||||||
|
|||||||
@@ -262,6 +262,9 @@
|
|||||||
z: lib.util.toNumber( data.rotateZ || data.rotate )
|
z: lib.util.toNumber( data.rotateZ || data.rotate )
|
||||||
},
|
},
|
||||||
scale: lib.util.toNumber( data.scale, 1 ),
|
scale: lib.util.toNumber( data.scale, 1 ),
|
||||||
|
transitionDuration: lib.util.toNumber(
|
||||||
|
data.transitionDuration, config.transitionDuration
|
||||||
|
),
|
||||||
el: el
|
el: el
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -416,6 +419,7 @@
|
|||||||
window.scrollTo( 0, 0 );
|
window.scrollTo( 0, 0 );
|
||||||
|
|
||||||
var step = stepsData[ "impress-" + el.id ];
|
var step = stepsData[ "impress-" + el.id ];
|
||||||
|
duration = ( duration !== undefined ? duration : step.transitionDuration );
|
||||||
|
|
||||||
// If we are in fact moving to another step, start with executing the registered
|
// If we are in fact moving to another step, start with executing the registered
|
||||||
// preStepLeave plugins.
|
// preStepLeave plugins.
|
||||||
|
|||||||
Reference in New Issue
Block a user