Skip to content

Commit 78c3840

Browse files
committed
add layout.transition attribute
... which will be used to set transition options during Plotly.react updates.
1 parent 1087b8e commit 78c3840

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/plots/animation_attributes.js

+2
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ module.exports = {
6969
role: 'info',
7070
min: 0,
7171
dflt: 500,
72+
editType: 'none',
7273
description: [
7374
'The duration of the transition, in milliseconds. If equal to zero,',
7475
'updates are synchronous.'
@@ -116,6 +117,7 @@ module.exports = {
116117
'bounce-in-out'
117118
],
118119
role: 'info',
120+
editType: 'none',
119121
description: 'The easing function used for the transition'
120122
},
121123
}

src/plots/layout_attributes.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
'use strict';
1010

1111
var fontAttrs = require('./font_attributes');
12+
var animationAttrs = require('./animation_attributes');
1213
var colorAttrs = require('../components/color/attributes');
14+
var extendFlat = require('../lib/extend').extendFlat;
1315

1416
var globalFont = fontAttrs({
1517
editType: 'calc',
@@ -253,5 +255,12 @@ module.exports = {
253255
description: 'Sets the color of the active or hovered on icons in the modebar.'
254256
},
255257
editType: 'modebar'
256-
}
258+
},
259+
260+
transition: extendFlat({}, animationAttrs.transition, {
261+
description: [
262+
'Sets transition options used during Plotly.react updates.'
263+
].join(' '),
264+
editType: 'none'
265+
})
257266
};

0 commit comments

Comments
 (0)