Skip to content

Commit 71b0cc4

Browse files
Syntax
1 parent 1c51d72 commit 71b0cc4

File tree

2 files changed

+16
-17
lines changed

2 files changed

+16
-17
lines changed

src/components/annotations/attributes.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,28 @@ var axisPlaceableObjs = require('../../constants/axis_placeable_objects');
1616

1717
function arrowAxisRefDescription(axis) {
1818
return [
19-
'In order for absolute positioning of the arrow to work, *a'+axis+
20-
'ref* must be exactly the same as *'+axis+'ref*, otherwise *a'+axis+
19+
'In order for absolute positioning of the arrow to work, *a' + axis +
20+
'ref* must be exactly the same as *' + axis + 'ref*, otherwise *a' + axis +
2121
'ref* will revert to *pixel* (explained next).',
22-
'For relative positioning, *a'+axis+'ref* can be set to *pixel*,',
23-
'in which case the *a'+axis+'* value is specified in pixels',
24-
'relative to *'+axis+'*.',
22+
'For relative positioning, *a' + axis + 'ref* can be set to *pixel*,',
23+
'in which case the *a' + axis + '* value is specified in pixels',
24+
'relative to *' + axis + '*.',
2525
'Absolute positioning is useful',
2626
'for trendline annotations which should continue to indicate',
2727
'the correct trend when zoomed. Relative positioning is useful',
2828
'for specifying the text offset for an annotated point.'
2929
].join(' ');
3030
}
3131

32-
function arrowCoordinateDescription(axis,lower,upper) {
32+
function arrowCoordinateDescription(axis, lower, upper) {
3333
return [
3434
'Sets the', axis, 'component of the arrow tail about the arrow head.',
35-
'If `a'+axis+'ref` is `pixel`, a positive (negative)',
35+
'If `a' + axis + 'ref` is `pixel`, a positive (negative)',
3636
'component corresponds to an arrow pointing',
37-
'from', upper, 'to', lower, '('+lower, 'to', upper+').',
38-
'If `a'+axis+'ref` is not `pixel` and is exactly the same as `'+axis+'ref`,',
37+
'from', upper, 'to', lower, '(' + lower, 'to', upper + ').',
38+
'If `a' + axis + 'ref` is not `pixel` and is exactly the same as `' + axis + 'ref`,',
3939
'this is an absolute value on that axis,',
40-
'like `'+axis+'`, specified in the same coordinates as `'+axis+'ref`.'
40+
'like `' + axis + '`, specified in the same coordinates as `' + axis + 'ref`.'
4141
].join(' ');
4242
}
4343

@@ -281,15 +281,15 @@ module.exports = templatedArray('annotation', {
281281
role: 'info',
282282
editType: 'calc+arraydraw',
283283
description: [
284-
arrowCoordinateDescription('x','left','right')
284+
arrowCoordinateDescription('x', 'left', 'right')
285285
].join(' ')
286286
},
287287
ay: {
288288
valType: 'any',
289289
role: 'info',
290290
editType: 'calc+arraydraw',
291291
description: [
292-
arrowCoordinateDescription('y','top','bottom')
292+
arrowCoordinateDescription('y', 'top', 'bottom')
293293
].join(' ')
294294
},
295295
axref: {

test/jasmine/assets/domain_ref/components.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,11 @@ var EQUALITY_TOLERANCE = 1e-2;
3030
// Array.from)
3131
function iterToArray(iter) {
3232
var a = [];
33-
do {
34-
var v = iter.next();
35-
// when done is true v.value is undefined
36-
if(v.done) { return a; }
33+
var v;
34+
// when done is true v.value is undefined
35+
for(v = iter.next(); !v.done; v = iter.next()) {
3736
a.push(v.value);
38-
} while(true);
37+
}
3938
return a;
4039
}
4140

0 commit comments

Comments
 (0)