Skip to content

Commit c8be45f

Browse files
committed
Extend xref and yref attributes
1 parent 3e2b0ac commit c8be45f

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

src/components/shapes/attributes.js

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,16 @@ module.exports = templatedArray('shape', {
119119
].join(' ')
120120
},
121121

122-
xref: extendFlat({}, annAttrs.xref, {
122+
xref: {
123+
valType: 'any',
124+
editType: 'calc',
123125
description: [
124126
'Sets the shape\'s x coordinate axis.',
125-
axisPlaceableObjs.axisRefDescription('x', 'left', 'right')
127+
axisPlaceableObjs.axisRefDescription('x', 'left', 'right'),
128+
'If an array of axis IDs is provided, each `x` value will refer to the corresponding axis',
129+
'(e.g., [\'x\', \'x2\'] for a rectangle means `x0` uses the `x` axis and `x1` uses the `x2` axis).',
126130
].join(' ')
127-
}),
131+
},
128132
xsizemode: {
129133
valType: 'enumerated',
130134
values: ['scaled', 'pixel'],
@@ -193,12 +197,16 @@ module.exports = templatedArray('shape', {
193197
'corresponds to the end of the category.'
194198
].join(' ')
195199
},
196-
yref: extendFlat({}, annAttrs.yref, {
200+
yref: {
201+
valType: 'any',
202+
editType: 'calc',
197203
description: [
198204
'Sets the shape\'s y coordinate axis.',
199-
axisPlaceableObjs.axisRefDescription('y', 'bottom', 'top')
205+
axisPlaceableObjs.axisRefDescription('y', 'bottom', 'top'),
206+
'If an array of axis IDs is provided, each `y` value will refer to the corresponding axis',
207+
'(e.g., [\'y\', \'y2\'] for a rectangle means `y0` uses the `y` axis and `y1` uses the `y2` axis).',
200208
].join(' ')
201-
}),
209+
},
202210
ysizemode: {
203211
valType: 'enumerated',
204212
values: ['scaled', 'pixel'],

0 commit comments

Comments
 (0)