Skip to content

Commit 33b28ec

Browse files
committed
fix: fix eslint mismatch
1 parent 6cfc094 commit 33b28ec

File tree

1 file changed

+42
-42
lines changed

1 file changed

+42
-42
lines changed

test/jasmine/tests/hover_label_test.js

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1792,58 +1792,58 @@ describe('hover info', function() {
17921792
.then(done, done.fail);
17931793
});
17941794

1795-
it("does not overlap lebels for different trace types", function (done) {
1795+
it('does not overlap lebels for different trace types', function(done) {
17961796
function trace(name, type, delta) {
1797-
return {
1798-
name: name,
1799-
type: type,
1800-
y: [0 + delta, 1 + delta, 2 + delta],
1801-
x: ["CAT 1", "CAT 2", "CAT 3"],
1802-
};
1797+
return {
1798+
name: name,
1799+
type: type,
1800+
y: [0 + delta, 1 + delta, 2 + delta],
1801+
x: ['CAT 1', 'CAT 2', 'CAT 3'],
1802+
};
18031803
}
1804-
1805-
var scatterName = "scatter_";
1806-
var barName = "bar_";
1804+
1805+
var scatterName = 'scatter_';
1806+
var barName = 'bar_';
18071807
var data = [];
1808-
for(var i = 0; i<3; i++) {
1809-
data.push(trace(barName + i, "bar", 0.0));
1810-
data.push(trace(scatterName + i, "scatter", 0.1));
1808+
var i;
1809+
for(i = 0; i < 3; i++) {
1810+
data.push(trace(barName + i, 'bar', 0.0));
1811+
data.push(trace(scatterName + i, 'scatter', 0.1));
18111812
}
18121813
var layout = {
1813-
width: 600,
1814-
height: 400,
1815-
hovermode: "x",
1814+
width: 600,
1815+
height: 400,
1816+
hovermode: 'x',
18161817
};
1817-
1818+
18181819
Plotly.newPlot(gd, data, layout)
1819-
.then(function () {
1820-
_hoverNatural(gd, 200, 200);
1821-
})
1822-
.then(function () {
1823-
expect(labelCount()).toBe(6);
1824-
})
1825-
.then(function () {
1826-
1827-
var nodes = [];
1828-
for(var i = 0; i<3; i++) {
1829-
nodes.push(hoverInfoNodes(barName + i).secondaryBox.getBoundingClientRect());
1830-
nodes.push(hoverInfoNodes(scatterName + i).secondaryBox.getBoundingClientRect());
1831-
}
1832-
nodes.sort(function(a,b) { return a.top - b.top; } );
1833-
1834-
for(var i = 0; i<5; i++) {
1820+
.then(function() {
1821+
_hoverNatural(gd, 200, 200);
1822+
})
1823+
.then(function() {
1824+
expect(labelCount()).toBe(6);
1825+
})
1826+
.then(function() {
1827+
var nodes = [];
1828+
for(i = 0; i < 3; i++) {
1829+
nodes.push(hoverInfoNodes(barName + i).secondaryBox.getBoundingClientRect());
1830+
nodes.push(hoverInfoNodes(scatterName + i).secondaryBox.getBoundingClientRect());
1831+
}
1832+
nodes.sort(function(a, b) { return a.top - b.top; });
1833+
1834+
for(i = 0; i < 5; i++) {
18351835
expect(
1836-
calcLineOverlap(
1837-
nodes[i].top,
1838-
nodes[i].bottom,
1839-
nodes[i+1].top,
1840-
nodes[i+1].bottom,
1841-
)
1842-
).toBeWithin(2, 1);
1836+
calcLineOverlap(
1837+
nodes[i].top,
1838+
nodes[i].bottom,
1839+
nodes[i + 1].top,
1840+
nodes[i + 1].bottom
1841+
)
1842+
).toBeWithin(2, 1);
18431843
}
1844-
})
1844+
})
18451845
.then(done, done.fail);
1846-
});
1846+
});
18471847
});
18481848

18491849
describe('constraints info graph viewport', function() {

0 commit comments

Comments
 (0)