Skip to content

Commit 71003da

Browse files
committed
#30a removing preexisting lint exemption directives and fixing former lint incompatibilities
1 parent a49a261 commit 71003da

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/plots/gl3d/scene.js

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
*/
88

99

10-
/*eslint block-scoped-var: 0*/
11-
/*eslint no-redeclare: 0*/
12-
1310
'use strict';
1411

1512
var createPlot = require('gl-plot3d');
@@ -34,6 +31,8 @@ var STATIC_CANVAS, STATIC_CONTEXT;
3431

3532
function render(scene) {
3633

34+
var trace;
35+
3736
// update size of svg container
3837
var svgContainer = scene.svgContainer;
3938
var clientRect = scene.container.getBoundingClientRect();
@@ -69,9 +68,10 @@ function render(scene) {
6968

7069
if(lastPicked !== null) {
7170
var pdata = project(scene.glplot.cameraParams, selection.dataCoordinate),
72-
trace = lastPicked.data,
7371
hoverinfo = trace.hoverinfo;
7472

73+
trace = lastPicked.data;
74+
7575
var xVal = formatter('xaxis', selection.traceCoordinate[0]),
7676
yVal = formatter('yaxis', selection.traceCoordinate[1]),
7777
zVal = formatter('zaxis', selection.traceCoordinate[2]);
@@ -172,7 +172,7 @@ function initializeGLPlot(scene, fullLayout, canvas, gl) {
172172
showNoWebGlMsg(scene);
173173
}
174174

175-
var relayoutCallback = function(scene, domEvent) {
175+
var relayoutCallback = function(scene) {
176176
var update = {};
177177
update[scene.id] = getLayoutCamera(scene.camera);
178178
scene.graphDiv.emit('plotly_relayout', update);
@@ -292,6 +292,7 @@ proto.recoverContext = function() {
292292
var axisProperties = [ 'xaxis', 'yaxis', 'zaxis' ];
293293

294294
function coordinateBound(axis, coord, d, bounds) {
295+
var x;
295296
for(var i=0; i<coord.length; ++i) {
296297
if(Array.isArray(coord[i])) {
297298
for(var j=0; j<coord[i].length; ++j) {
@@ -303,7 +304,7 @@ function coordinateBound(axis, coord, d, bounds) {
303304
}
304305
}
305306
else {
306-
var x = axis.d2l(coord[i]);
307+
x = axis.d2l(coord[i]);
307308
if(!isNaN(x) && isFinite(x)) {
308309
bounds[0][d] = Math.min(bounds[0][d], x);
309310
bounds[1][d] = Math.max(bounds[1][d], x);
@@ -326,7 +327,7 @@ proto.plot = function(sceneData, fullLayout, layout) {
326327
if(this.glplot.contextLost) return;
327328

328329
var data, trace;
329-
var i, j;
330+
var i, j, axis, axisType;
330331
var fullSceneLayout = fullLayout[this.id];
331332
var sceneLayout = layout[this.id];
332333

@@ -350,7 +351,7 @@ proto.plot = function(sceneData, fullLayout, layout) {
350351

351352
// Update axes functions BEFORE updating traces
352353
for(i = 0; i < 3; ++i) {
353-
var axis = fullSceneLayout[axisProperties[i]];
354+
axis = fullSceneLayout[axisProperties[i]];
354355
setConvert(axis);
355356
}
356357

@@ -426,7 +427,7 @@ proto.plot = function(sceneData, fullLayout, layout) {
426427

427428
for(i = 0; i < 3; ++i) {
428429
axis = fullSceneLayout[axisProperties[i]];
429-
var axisType = axis.type;
430+
axisType = axis.type;
430431

431432
if(axisType in axisTypeRatios) {
432433
axisTypeRatios[axisType].acc *= dataScale[i];

0 commit comments

Comments
 (0)