Skip to content

Commit 9249684

Browse files
fixed syntax, removed scraps
1 parent c9103df commit 9249684

17 files changed

+40
-1156
lines changed

src/components/annotations/defaults.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ function handleAnnotationDefaults(annIn, annOut, fullLayout) {
6161
var arrowPosAttr = 'a' + axLetter;
6262
// axref, ayref
6363
var aaxRef = Axes.coerceRef(annIn, annOut, gdMock, arrowPosAttr, '',
64-
['paper','pixel'], true);
64+
['paper', 'pixel'], true);
6565

6666
// for now the arrow can only be on the same axis or specified as pixels
6767
// TODO: sometime it might be interesting to allow it to be on *any* axis

src/components/images/attributes.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ module.exports = templatedArray('image', {
5858
'Sets the image container size horizontally.',
5959
'The image will be sized based on the `position` value.',
6060
'When `xref` is set to `paper`, units are sized relative',
61-
'to the plot width.'
61+
'to the plot width.',
62+
'When `xref` ends with ` domain`, units are sized relative',
63+
'to the axis width.',
6264
].join(' ')
6365
},
6466

@@ -71,7 +73,9 @@ module.exports = templatedArray('image', {
7173
'Sets the image container size vertically.',
7274
'The image will be sized based on the `position` value.',
7375
'When `yref` is set to `paper`, units are sized relative',
74-
'to the plot height.'
76+
'to the plot height.',
77+
'When `yref` ends with ` domain`, units are sized relative',
78+
'to the axis height.'
7579
].join(' ')
7680
},
7781

src/components/images/draw.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,8 @@ module.exports = function draw(gd) {
206206

207207

208208
// Set proper clipping on images
209-
var xId = xa && (Axes.getRefType(d.xref) != 'domain') ? xa._id : '';
210-
var yId = ya && (Axes.getRefType(d.yref) != 'domain') ? ya._id : '';
209+
var xId = xa && (Axes.getRefType(d.xref) !== 'domain') ? xa._id : '';
210+
var yId = ya && (Axes.getRefType(d.yref) !== 'domain') ? ya._id : '';
211211
var clipAxes = xId + yId;
212212

213213
Drawing.setClipUrl(

src/plots/cartesian/axes.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ axes.coerceRef = function(containerIn, containerOut, gd, attr, dflt, extraOption
9797
attrDef[refAttr] = {
9898
valType: 'enumerated',
9999
values: axlist.concat(extraOption ?
100-
(typeof extraOption === 'string' ? [extraOption] : extraOption)
101-
: []),
100+
(typeof extraOption === 'string' ? [extraOption] : extraOption) :
101+
[]),
102102
dflt: dflt
103103
};
104104

test/all_layout_annotations_test.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

test/all_layout_images_test.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

test/domain_ref_shapes_test.html

Lines changed: 0 additions & 9 deletions
This file was deleted.

test/domain_ref_test.html

Lines changed: 0 additions & 18 deletions
This file was deleted.

test/domain_ref_test.js

Lines changed: 0 additions & 133 deletions
This file was deleted.

0 commit comments

Comments
 (0)