Skip to content
Permalink
Browse files

fix duration 0 bug

  • Loading branch information
rolyatmax committed Sep 19, 2019
1 parent a340cbb commit 2568390431fa873964af726d50ce773c3084316a
@@ -55,7 +55,8 @@ export default class AttributeTransitionManager {

for (const attributeName in this.transitions) {
const attribute = attributes[attributeName];
if (!attribute || !attribute.supportsTransition()) {
const settings = attribute && attribute.getTransitionSetting(transitions);
if (!attribute || !attribute.supportsTransition() || !settings) {
// Animated attribute has been removed
this._removeTransition(attributeName);
}
@@ -20,6 +20,9 @@ export function normalizeTransitionSettings(userSettings, layerSettings) {
userSettings = {duration: userSettings};
}
userSettings.type = userSettings.type || 'interpolation';
if (userSettings.type === 'interpolation' && userSettings.duration < 1) {
return null; // return null because there's no transition to perform
}
return Object.assign(
{},
DEFAULT_TRANSITION_SETTINGS[userSettings.type],

0 comments on commit 2568390

Please sign in to comment.
You can’t perform that action at this time.