Skip to content

Commit

Permalink
Fixed missing lock logic when dragging skeleton points (#8084)
Browse files Browse the repository at this point in the history
  • Loading branch information
bsekachev authored Jun 25, 2024
1 parent 431865f commit 8c4fc83
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions cvat-canvas/src/typescript/canvasView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1223,16 +1223,18 @@ export class CanvasViewImpl implements CanvasView, Listener {
}
};

this.draggable(elementState, element, () => {
this.mode = Mode.DRAG;
hideElementText();
}, () => {
skeletonSVGTemplate = skeletonSVGTemplate ?? makeSVGFromTemplate(state.label.structure.svg);
setupSkeletonEdges(shape as SVG.G, skeletonSVGTemplate);
}, () => {
this.mode = Mode.IDLE;
showElementText();
});
if (!elementState.lock) {
this.draggable(elementState, element, () => {
this.mode = Mode.DRAG;
hideElementText();
}, () => {
skeletonSVGTemplate = skeletonSVGTemplate ?? makeSVGFromTemplate(state.label.structure.svg);
setupSkeletonEdges(shape as SVG.G, skeletonSVGTemplate);
}, () => {
this.mode = Mode.IDLE;
showElementText();
});
}
} else {
this.draggable(null, element);
}
Expand Down

0 comments on commit 8c4fc83

Please sign in to comment.