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

Function computeAnnotationBounds

src/plots/gl3d/scene.js:535–556  ·  view source on GitHub ↗
(scene, bounds)

Source from the content-addressed store, hash-verified

533}
534
535function computeAnnotationBounds(scene, bounds) {
536 var fullSceneLayout = scene.fullSceneLayout;
537 var annotations = fullSceneLayout.annotations || [];
538
539 for(var d = 0; d < 3; d++) {
540 var axisName = axisProperties[d];
541 var axLetter = axisName.charAt(0);
542 var ax = fullSceneLayout[axisName];
543
544 for(var j = 0; j < annotations.length; j++) {
545 var ann = annotations[j];
546
547 if(ann.visible) {
548 var pos = ax.r2l(ann[axLetter]);
549 if(!isNaN(pos) && isFinite(pos)) {
550 bounds[0][d] = Math.min(bounds[0][d], pos);
551 bounds[1][d] = Math.max(bounds[1][d], pos);
552 }
553 }
554 }
555 }
556}
557
558proto.plot = function(sceneData, fullLayout, layout) {
559 var scene = this;

Callers 1

scene.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…