-
Notifications
You must be signed in to change notification settings - Fork 12k
Closed
Milestone
Description
At present, the animation options can include settings for any of the given modes, along with user definable properties and collections. There runs a risk of collisions between the user defined attributes and the existing settings.
We should consider isolating these settings into sub keys.
Before
defaults.set('animation', {
// Plain properties can be overridden in each object
duration: 1000,
easing: 'easeOutQuart',
onProgress: noop,
onComplete: noop,
// Property sets
colors: {
type: 'color',
properties: colors
},
numbers: {
type: 'number',
properties: numbers
},
// Update modes. These are overrides / additions to the above animations.
active: {
duration: 400
},
resize: {
duration: 0
},
show: {
colors: {
type: 'color',
properties: colors,
from: 'transparent'
},
visible: {
type: 'boolean',
duration: 0 // show immediately
},
},
hide: {
colors: {
type: 'color',
properties: colors,
to: 'transparent'
},
visible: {
type: 'boolean',
easing: 'easeInExpo' // for keeping the dataset visible almost all the way through the animation
},
}
});After
defaults.set('animation', {
// Plain properties can be overridden in each object
duration: 1000,
easing: 'easeOutQuart',
onProgress: noop,
onComplete: noop,
// Collections
collections: {
},
// Property sets
properties: {
colors: {
type: 'color',
properties: colors
},
numbers: {
type: 'number',
properties: numbers
},
},
// Update modes. These are overrides / additions to the above animations.
modes: {
active: {
duration: 400
},
resize: {
duration: 0
},
show: {
colors: {
type: 'color',
properties: colors,
from: 'transparent'
},
visible: {
type: 'boolean',
duration: 0 // show immediately
},
},
hide: {
colors: {
type: 'color',
properties: colors,
to: 'transparent'
},
visible: {
type: 'boolean',
easing: 'easeInExpo' // for keeping the dataset visible almost all the way through the animation
},
},
}
});