Skip to content

Commit a2f61b7

Browse files
committed
lint
1 parent fdba7f1 commit a2f61b7

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

src/plots/gl3d/scene.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ var STATIC_CANVAS, STATIC_CONTEXT;
3434

3535
function render(scene) {
3636

37-
//Update size of svg container
37+
// update size of svg container
3838
var svgContainer = scene.svgContainer;
3939
var clientRect = scene.container.getBoundingClientRect();
4040
var width = clientRect.width, height = clientRect.height;
@@ -45,7 +45,7 @@ function render(scene) {
4545
computeTickMarks(scene);
4646
scene.glplot.axes.update(scene.axesOptions);
4747

48-
//Check if pick has changed
48+
// check if pick has changed
4949
var keys = Object.keys(scene.traces);
5050
var lastPicked = null;
5151
var selection = scene.glplot.selection;
@@ -59,7 +59,6 @@ function render(scene) {
5959
}
6060

6161
function formatter(axisName, val) {
62-
if(val === undefined) return undefined;
6362
if(typeof val === 'string') return val;
6463

6564
var axis = scene.fullSceneLayout[axisName];
@@ -136,9 +135,9 @@ function initializeGLPlot(scene, fullLayout, canvas, gl) {
136135
autoBounds: false
137136
};
138137

139-
//For static plots, we reuse the WebGL context as WebKit doesn't collect them
140-
//reliably
141-
if (scene.staticMode) {
138+
// for static plots, we reuse the WebGL context
139+
// as WebKit doesn't collect them reliably
140+
if(scene.staticMode) {
142141
if(!STATIC_CONTEXT) {
143142
STATIC_CANVAS = document.createElement('canvas');
144143
try {
@@ -204,13 +203,14 @@ function initializeGLPlot(scene, fullLayout, canvas, gl) {
204203

205204
function Scene(options, fullLayout) {
206205

207-
//Create sub container for plot
206+
// create sub container for plot
208207
var sceneContainer = document.createElement('div');
209208
var plotContainer = options.container;
210209

211210
// keep a ref to the graph div to fire hover+click events
212211
this.graphDiv = options.graphDiv;
213-
//Create SVG container for hover text
212+
213+
// create SVG container for hover text
214214
var svgContainer = document.createElementNS(
215215
'http://www.w3.org/2000/svg',
216216
'svg');

src/plots/plots.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -470,11 +470,10 @@ plots.supplyDefaults = function(gd) {
470470
};
471471

472472
function cleanScenes(newFullLayout, oldFullLayout) {
473-
var oldSceneKey,
474-
oldSceneKeys = plots.getSubplotIds(oldFullLayout, 'gl3d');
473+
var oldSceneKeys = plots.getSubplotIds(oldFullLayout, 'gl3d');
475474

476-
for (var i = 0; i < oldSceneKeys.length; i++) {
477-
oldSceneKey = oldSceneKeys[i];
475+
for(var i = 0; i < oldSceneKeys.length; i++) {
476+
var oldSceneKey = oldSceneKeys[i];
478477
if(!newFullLayout[oldSceneKey] && !!oldFullLayout[oldSceneKey]._scene) {
479478
oldFullLayout[oldSceneKey]._scene.destroy();
480479
}

0 commit comments

Comments
 (0)