Skip to content

Commit 0e0928b

Browse files
authoredNov 15, 2016
Merge pull request #1144 from plotly/plot-schema-from-registry
Refactor PlotSchema
2 parents 0649d16 + 93fa913 commit 0e0928b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+613
-740
lines changed
 

Diff for: ‎src/components/annotations/attributes.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var extendFlat = require('../../lib/extend').extendFlat;
1515

1616

1717
module.exports = {
18-
_isLinkedToArray: true,
18+
_isLinkedToArray: 'annotation',
1919

2020
visible: {
2121
valType: 'boolean',

Diff for: ‎src/components/annotations/index.js

+9-21
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,16 @@
99

1010
'use strict';
1111

12-
var Plotly = require('../../plotly');
13-
14-
exports.moduleType = 'component';
15-
16-
exports.name = 'annotations';
17-
18-
exports.ARROWPATHS = require('./arrow_paths');
19-
20-
exports.layoutAttributes = require('./attributes');
21-
22-
exports.supplyLayoutDefaults = require('./defaults');
23-
24-
exports.calcAutorange = require('./calc_autorange');
25-
26-
exports.arrowhead = require('./draw_arrow_head');
27-
2812
var drawModule = require('./draw');
29-
exports.draw = drawModule.draw;
30-
exports.drawOne = drawModule.drawOne;
3113

32-
exports.add = function(gd) {
33-
var nextAnn = gd._fullLayout.annotations.length;
14+
module.exports = {
15+
moduleType: 'component',
16+
name: 'annotations',
17+
18+
layoutAttributes: require('./attributes'),
19+
supplyLayoutDefaults: require('./defaults'),
3420

35-
Plotly.relayout(gd, 'annotations[' + nextAnn + ']', 'add');
21+
calcAutorange: require('./calc_autorange'),
22+
draw: drawModule.draw,
23+
drawOne: drawModule.drawOne
3624
};

0 commit comments

Comments
 (0)