Skip to content

Commit c084da0

Browse files
committed
rename _scene ref to scene id in annotation container _sceneId
1 parent adfc305 commit c084da0

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/components/annotations/draw.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,12 @@ function drawRaw(gd, options, index, xa, ya) {
8383
var fullLayout = gd._fullLayout;
8484
var gs = gd._fullLayout._size;
8585

86-
var className = options._scene ?
87-
'annotation-' + options._scene :
86+
var className = options._sceneId ?
87+
'annotation-' + options._sceneId :
8888
'annotation';
8989

90-
var annbase = options._scene ?
91-
options._scene + '.annotations[' + index + ']' :
90+
var annbase = options._sceneId ?
91+
options._sceneId + '.annotations[' + index + ']' :
9292
'annotations[' + index + ']';
9393

9494
// remove the existing annotation if there is one
@@ -515,7 +515,7 @@ function drawRaw(gd, options, index, xa, ya) {
515515

516516
// the arrow dragger is a small square right at the head, then a line to the tail,
517517
// all expanded by a stroke width of 6px plus the arrow line width
518-
if(gd._context.editable && arrow.node().parentNode && !options._scene) {
518+
if(gd._context.editable && arrow.node().parentNode && !options._sceneId) {
519519
var arrowDragHeadX = headX;
520520
var arrowDragHeadY = headY;
521521
if(options.standoff) {
@@ -625,7 +625,7 @@ function drawRaw(gd, options, index, xa, ya) {
625625

626626
drawArrow(dx, dy);
627627
}
628-
else if(!options._scene) {
628+
else if(!options._sceneId) {
629629
if(xa) update[annbase + '.x'] = options.x + dx / xa._m;
630630
else {
631631
var widthFraction = options._xsize / gs.w,

src/components/annotations3d/defaults.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module.exports = function handleDefaults(sceneLayoutIn, sceneLayoutOut, opts) {
1818
name: 'annotations',
1919
handleItemDefaults: handleAnnotationDefaults,
2020
fullLayout: opts.fullLayout,
21-
scene: opts.id
21+
sceneId: opts.id
2222
});
2323
};
2424

@@ -64,7 +64,7 @@ function handleAnnotationDefaults(annIn, annOut, sceneLayout, opts, itemOpts) {
6464
Lib.noneOrAll(annIn, annOut, ['ax', 'ay']);
6565
}
6666

67-
annOut._scene = opts.scene;
67+
annOut._sceneId = opts.sceneId;
6868

6969
return annOut;
7070
}

0 commit comments

Comments
 (0)