Skip to content

Commit d72fc6b

Browse files
author
Marcel Pursche
committed
Applied eslint fixes
1 parent b909d8f commit d72fc6b

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

src/traces/scattergl/index.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -389,18 +389,18 @@ function plot(gd, subplot, cdata) {
389389
}
390390

391391
// update main marker options
392-
if(scene.glText) {
393-
if (scene.count > scene.glText.length) {
392+
if(scene.glText) {
393+
if(scene.count > scene.glText.length) {
394394
// add gl text marker
395395
var textsToAdd = scene.count - scene.glText.length;
396-
for(i=0; i < textsToAdd; i++) {
396+
for(i = 0; i < textsToAdd; i++) {
397397
scene.glText.push(new Text(regl));
398398
}
399-
} else if (scene.count < scene.glText.length) {
399+
} else if(scene.count < scene.glText.length) {
400400
// remove gl text marker
401401
var textsToRemove = scene.glText.length - scene.count;
402402
var removedTexts = scene.glText.splice(scene.count, textsToRemove);
403-
removedTexts.forEach(function (text) { text.destroy(); });
403+
removedTexts.forEach(function(text) { text.destroy(); });
404404
}
405405

406406
for(i = 0; i < scene.count; i++) {

test/jasmine/tests/scattergl_test.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,24 @@ describe('end-to-end scattergl tests', function() {
1919
x: [1, 2, 3, 4, 5, 6, 7],
2020
y: [2, 3, 4, 5, 6, 7, 8],
2121
text: 'Test'
22-
}]).then(function () {
22+
}]).then(function() {
2323
var fullLayout = gd._fullLayout;
24-
var subplot = fullLayout._plots['xy'];
24+
var subplot = fullLayout._plots.xy;
2525
var scene = subplot._scene;
2626
expect(scene.glText.length).toEqual(1);
2727
}).catch(failTest).then(done);
2828
});
2929

30-
it('should update a plot with text labels', function (done) {
30+
it('should update a plot with text labels', function(done) {
3131
Plotly.react(gd, [{
3232
type: 'scattergl',
3333
mode: 'text+lines',
3434
x: [1, 2, 3, 4, 5, 6, 7],
3535
y: [2, 3, 4, 5, 6, 7, 8],
3636
text: 'Test'
37-
}]).then(function () {
37+
}]).then(function() {
3838
var fullLayout = gd._fullLayout;
39-
var subplot = fullLayout._plots['xy'];
39+
var subplot = fullLayout._plots.xy;
4040
var scene = subplot._scene;
4141
expect(scene.glText.length).toEqual(1);
4242

@@ -64,9 +64,9 @@ describe('end-to-end scattergl tests', function() {
6464
text: 'Test 3'
6565
}
6666
]);
67-
}).then(function () {
67+
}).then(function() {
6868
var fullLayout = gd._fullLayout;
69-
var subplot = fullLayout._plots['xy'];
69+
var subplot = fullLayout._plots.xy;
7070
var scene = subplot._scene;
7171
expect(scene.glText.length).toEqual(3);
7272

@@ -87,9 +87,9 @@ describe('end-to-end scattergl tests', function() {
8787
text: 'Test 2'
8888
}
8989
]);
90-
}).then(function () {
90+
}).then(function() {
9191
var fullLayout = gd._fullLayout;
92-
var subplot = fullLayout._plots['xy'];
92+
var subplot = fullLayout._plots.xy;
9393
var scene = subplot._scene;
9494
expect(scene.glText.length).toEqual(2);
9595
}).catch(failTest).then(done);

0 commit comments

Comments
 (0)