Skip to content

Commit 78b82b8

Browse files
authoredMay 26, 2017
Merge pull request #1732 from plotly/fixup-camera-interaction-relayout-event-data
Fixup camera interaction relayout event data
2 parents 1dddc6e + 1dbe2b9 commit 78b82b8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎src/plots/gl3d/scene.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ function initializeGLPlot(scene, fullLayout, canvas, gl) {
179179
if(scene.fullSceneLayout.dragmode === false) return;
180180

181181
var update = {};
182-
update[scene.id] = getLayoutCamera(scene.camera);
182+
update[scene.id + '.camera'] = getLayoutCamera(scene.camera);
183183
scene.saveCamera(scene.graphDiv.layout);
184184
scene.graphDiv.emit('plotly_relayout', update);
185185
};

‎test/jasmine/tests/gl_plot_interact_basic_test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function verifyInteractionEffects(tuple) {
3838
expect(tuple.relayoutCallback).toHaveBeenCalledTimes(1);
3939

4040
// Check structure of event callback value contents
41-
expect(tuple.relayoutCallback).toHaveBeenCalledWith(jasmine.objectContaining({scene: cameraStructure}));
41+
expect(tuple.relayoutCallback).toHaveBeenCalledWith(jasmine.objectContaining({'scene.camera': cameraStructure}));
4242

4343
// Check camera contents on the DIV layout
4444
var divCamera = tuple.graphDiv.layout.scene.camera;

0 commit comments

Comments
 (0)
Please sign in to comment.