Skip to content

Commit d50da33

Browse files
committed
fix circular dependency
1 parent 822fe0d commit d50da33

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

src/components/shapes/draw_newshape/attributes.js

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use strict';
22

33
var fontAttrs = require('../../../plots/font_attributes');
4-
var annAttrs = require('../../annotations/attributes');
54
var dash = require('../../drawing/attributes').dash;
65
var extendFlat = require('../../../lib/extend').extendFlat;
76

@@ -102,23 +101,32 @@ module.exports = {
102101
},
103102
textangle: {
104103
valType: 'angle',
105-
editType: 'calc+arraydraw',
104+
editType: 'none',
106105
description: [
107106
'Sets the angle at which the label text is drawn',
108107
'with respect to the horizontal. For lines, the default textangle is `auto`,',
109108
'which displays the text at the same angle as the line. For all other shapes,',
110109
'the default textangle is 0 (horizontal).'
111110
].join(' ')
112111
},
113-
xanchor: extendFlat({}, annAttrs.xanchor, {
112+
xanchor: {
113+
valType: 'enumerated',
114+
values: ['auto', 'left', 'center', 'right'],
115+
dflt: 'auto',
116+
editType: 'none',
114117
description: 'Sets the text box\'s horizontal position anchor.',
115-
}),
116-
yanchor: extendFlat({}, annAttrs.yanchor, {
118+
},
119+
yanchor: {
120+
valType: 'enumerated',
121+
values: ['auto', 'top', 'middle', 'bottom'],
122+
dflt: 'auto',
123+
editType: 'none',
117124
description: 'Sets the text box\'s vertical position anchor.',
118-
}),
125+
},
119126
padding: {
120127
valType: 'number',
121128
dflt: 3,
129+
editType: 'none',
122130
description: 'Sets padding between edge of label and xanchor / yanchor.'
123131
},
124132
},

test/plot-schema.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3598,6 +3598,7 @@
35983598
"padding": {
35993599
"description": "Sets padding between edge of label and xanchor / yanchor.",
36003600
"dflt": 3,
3601+
"editType": "none",
36013602
"valType": "number"
36023603
},
36033604
"role": "object",
@@ -3608,7 +3609,7 @@
36083609
},
36093610
"textangle": {
36103611
"description": "Sets the angle at which the label text is drawn with respect to the horizontal. For lines, the default textangle is `auto`, which displays the text at the same angle as the line. For all other shapes, the default textangle is 0 (horizontal).",
3611-
"editType": "calc+arraydraw",
3612+
"editType": "none",
36123613
"valType": "angle"
36133614
},
36143615
"textposition": {
@@ -3632,7 +3633,7 @@
36323633
"xanchor": {
36333634
"description": "Sets the text box's horizontal position anchor.",
36343635
"dflt": "auto",
3635-
"editType": "calc+arraydraw",
3636+
"editType": "none",
36363637
"valType": "enumerated",
36373638
"values": [
36383639
"auto",
@@ -3644,7 +3645,7 @@
36443645
"yanchor": {
36453646
"description": "Sets the text box's vertical position anchor.",
36463647
"dflt": "auto",
3647-
"editType": "calc+arraydraw",
3648+
"editType": "none",
36483649
"valType": "enumerated",
36493650
"values": [
36503651
"auto",

0 commit comments

Comments
 (0)