Skip to content

Commit e4a9de5

Browse files
committed
schema: rm _composedModule abstraction
- that abstraction was mostly obsolete - the only remaining 'composed-module' was Fx, simply merge its attribute into base layout attributes.
1 parent 8214577 commit e4a9de5

File tree

2 files changed

+19
-21
lines changed

2 files changed

+19
-21
lines changed

src/plots/cartesian/graph_interact.js

+3-19
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ var dragElement = require('../../components/dragelement');
2323
var Axes = require('./axes');
2424
var constants = require('./constants');
2525
var dragBox = require('./dragbox');
26+
var layoutAttributes = require('../layout_attributes');
2627

2728

2829
var fx = module.exports = {};
@@ -32,29 +33,12 @@ var fx = module.exports = {};
3233
fx.unhover = dragElement.unhover;
3334

3435
fx.layoutAttributes = {
35-
dragmode: {
36-
valType: 'enumerated',
37-
role: 'info',
38-
values: ['zoom', 'pan', 'select', 'lasso', 'orbit', 'turntable'],
39-
dflt: 'zoom',
40-
description: [
41-
'Determines the mode of drag interactions.',
42-
'*select* and *lasso* apply only to scatter traces with',
43-
'markers or text. *orbit* and *turntable* apply only to',
44-
'3D scenes.'
45-
].join(' ')
46-
},
47-
hovermode: {
48-
valType: 'enumerated',
49-
role: 'info',
50-
values: ['x', 'y', 'closest', false],
51-
description: 'Determines the mode of hover interactions.'
52-
}
5336
};
5437

5538
fx.supplyLayoutDefaults = function(layoutIn, layoutOut, fullData) {
39+
5640
function coerce(attr, dflt) {
57-
return Lib.coerce(layoutIn, layoutOut, fx.layoutAttributes, attr, dflt);
41+
return Lib.coerce(layoutIn, layoutOut, layoutAttributes, attr, dflt);
5842
}
5943

6044
coerce('dragmode');

src/plots/layout_attributes.js

+16-2
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,23 @@ module.exports = {
171171
description: 'Determines whether or not a legend is drawn.'
172172
},
173173

174-
_composedModules: {
175-
'*': 'Fx'
174+
dragmode: {
175+
valType: 'enumerated',
176+
role: 'info',
177+
values: ['zoom', 'pan', 'select', 'lasso', 'orbit', 'turntable'],
178+
dflt: 'zoom',
179+
description: [
180+
'Determines the mode of drag interactions.',
181+
'*select* and *lasso* apply only to scatter traces with',
182+
'markers or text. *orbit* and *turntable* apply only to',
183+
'3D scenes.'
184+
].join(' ')
176185
},
186+
hovermode: {
187+
valType: 'enumerated',
188+
role: 'info',
189+
values: ['x', 'y', 'closest', false],
190+
description: 'Determines the mode of hover interactions.'
177191

178192
_nestedModules: {
179193
'xaxis': 'Axes',

0 commit comments

Comments
 (0)