Skip to content

Commit a96af57

Browse files
committed
mv fx attribute out of plots/ and into components/fx/
1 parent 27fb2d0 commit a96af57

File tree

4 files changed

+36
-19
lines changed

4 files changed

+36
-19
lines changed

src/components/fx/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,18 @@ var d3 = require('d3');
1212
var Lib = require('../../lib');
1313
var dragElement = require('../dragelement');
1414
var helpers = require('./helpers');
15+
var layoutAttributes = require('./layout_attributes');
1516

1617
module.exports = {
1718
moduleType: 'component',
1819
name: 'fx',
1920

2021
constants: require('./constants'),
22+
schema: {
23+
layout: layoutAttributes
24+
},
2125

26+
layoutAttributes: layoutAttributes,
2227
supplyLayoutDefaults: require('./layout_defaults'),
2328

2429
getDistanceFunction: helpers.getDistanceFunction,
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/**
2+
* Copyright 2012-2017, Plotly, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the MIT license found in the
6+
* LICENSE file in the root directory of this source tree.
7+
*/
8+
9+
'use strict';
10+
11+
module.exports = {
12+
dragmode: {
13+
valType: 'enumerated',
14+
role: 'info',
15+
values: ['zoom', 'pan', 'select', 'lasso', 'orbit', 'turntable'],
16+
dflt: 'zoom',
17+
description: [
18+
'Determines the mode of drag interactions.',
19+
'*select* and *lasso* apply only to scatter traces with',
20+
'markers or text. *orbit* and *turntable* apply only to',
21+
'3D scenes.'
22+
].join(' ')
23+
},
24+
hovermode: {
25+
valType: 'enumerated',
26+
role: 'info',
27+
values: ['x', 'y', 'closest', false],
28+
description: 'Determines the mode of hover interactions.'
29+
}
30+
};

src/components/fx/layout_defaults.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
'use strict';
1010

1111
var Lib = require('../../lib');
12-
var layoutAttributes = require('../../plots/layout_attributes');
12+
var layoutAttributes = require('./layout_attributes');
1313

1414
module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {
1515
function coerce(attr, dflt) {

src/plots/layout_attributes.js

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -169,23 +169,5 @@ module.exports = {
169169
valType: 'boolean',
170170
role: 'info',
171171
description: 'Determines whether or not a legend is drawn.'
172-
},
173-
dragmode: {
174-
valType: 'enumerated',
175-
role: 'info',
176-
values: ['zoom', 'pan', 'select', 'lasso', 'orbit', 'turntable'],
177-
dflt: 'zoom',
178-
description: [
179-
'Determines the mode of drag interactions.',
180-
'*select* and *lasso* apply only to scatter traces with',
181-
'markers or text. *orbit* and *turntable* apply only to',
182-
'3D scenes.'
183-
].join(' ')
184-
},
185-
hovermode: {
186-
valType: 'enumerated',
187-
role: 'info',
188-
values: ['x', 'y', 'closest', false],
189-
description: 'Determines the mode of hover interactions.'
190172
}
191173
};

0 commit comments

Comments
 (0)