Skip to content

Commit b29b3b2

Browse files
committed
rewrite relayoutCallback as func declaration
1 parent dc90d13 commit b29b3b2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/plots/gl2d/scene2d.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,8 @@ proto.updateFx = function(options) {
288288
fullLayout.hovermode = options.hovermode;
289289
};
290290

291-
var relayoutCallback = function(scene) {
292291

292+
function relayoutCallback(scene) {
293293
var xrange = scene.xaxis.range,
294294
yrange = scene.yaxis.range;
295295

@@ -300,8 +300,10 @@ var relayoutCallback = function(scene) {
300300
scene.graphDiv.layout.yaxis.range = yrange.slice(0);
301301

302302
// Make a meaningful value to be passed on to the possible 'plotly_relayout' subscriber(s)
303-
var update = { // scene.camera has no many useful projection or scale information
304-
lastInputTime: scene.camera.lastInputTime // helps determine which one is the latest input (if async)
303+
// scene.camera has no many useful projection or scale information
304+
// helps determine which one is the latest input (if async)
305+
var update = {
306+
lastInputTime: scene.camera.lastInputTime
305307
};
306308
update[scene.xaxis._name] = xrange.slice();
307309
update[scene.yaxis._name] = yrange.slice();

0 commit comments

Comments
 (0)