Skip to content

Commit b7ab656

Browse files
committed
don't try to edit x,y,z positions for 3D annotations
- as this problem is ill-defined, mouse xy -> scene xyz as infinity-many solutions. - N.B. editing arrow tail position (i.e. ax, ay) and annotation text works!
1 parent c5f6eb2 commit b7ab656

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/annotations/draw.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ function drawRaw(gd, options, index, xa, ya) {
501501

502502
// the arrow dragger is a small square right at the head, then a line to the tail,
503503
// all expanded by a stroke width of 6px plus the arrow line width
504-
if(gd._context.editable && arrow.node().parentNode) {
504+
if(gd._context.editable && arrow.node().parentNode && !options._scene) {
505505
var arrowDragHeadX = headX;
506506
var arrowDragHeadY = headY;
507507
if(options.standoff) {
@@ -610,7 +610,7 @@ function drawRaw(gd, options, index, xa, ya) {
610610

611611
drawArrow(dx, dy);
612612
}
613-
else {
613+
else if(!options._scene) {
614614
if(xa) update[annbase + '.x'] = options.x + dx / xa._m;
615615
else {
616616
var widthFraction = options._xsize / gs.w,
@@ -638,6 +638,7 @@ function drawRaw(gd, options, index, xa, ya) {
638638
);
639639
}
640640
}
641+
else return;
641642

642643
annTextGroup.attr({
643644
transform: 'translate(' + dx + ',' + dy + ')' + baseTextTransform

0 commit comments

Comments
 (0)