MCPcopy Index your code
hub / github.com/plotly/plotly.js / updateCamera

Function updateCamera

test/jasmine/tests/gl3d_plot_interact_test.js:1632–1644  ·  view source on GitHub ↗
(x, y, z)

Source from the content-addressed store, hash-verified

1630
1631 // more robust (especially on CI) than update camera via mouse events
1632 function updateCamera(x, y, z) {
1633 var scene = gd._fullLayout.scene._scene;
1634 var camera = scene.getCamera();
1635
1636 camera.eye = {x: x, y: y, z: z};
1637 scene.setViewport({
1638 camera: camera,
1639 aspectratio: gd._fullLayout.scene.aspectratio
1640 });
1641 // need a fairly long delay to let the camera update here
1642 // 300 was not robust for me (AJ), 500 seems to be.
1643 return delay(500)();
1644 }
1645
1646 it('@gl should move with camera', function(done) {
1647 Plotly.newPlot(gd, [{

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…