File tree Expand file tree Collapse file tree 1 file changed +19
-17
lines changed
apps/roam/src/components/canvas Expand file tree Collapse file tree 1 file changed +19
-17
lines changed Original file line number Diff line number Diff line change @@ -851,23 +851,25 @@ const InsideEditorAndUiContext = ({
851851 editor . sideEffects . registerBeforeChangeHandler (
852852 "shape" ,
853853 ( prevShape , nextShape ) => {
854- // prevent accidental arrow reposition
855- if ( isCustomArrowShape ( prevShape ) ) {
856- const bindings = editor . getBindingsFromShape (
857- prevShape ,
858- prevShape . type ,
859- ) ;
860- const isTranslating = editor . isIn ( "select.translating" ) ;
861- if ( bindings . length && isTranslating ) {
862- editor . setSelectedShapes ( [ ] ) ;
863- toasts . addToast ( {
864- id : "tldraw-toast-cannot-move-relation" ,
865- title : "Cannot move relation." ,
866- severity : "warning" ,
867- } ) ;
868- return prevShape ;
869- }
870- }
854+ // TODO: Re-enable relation movement prevention with a different mechanism
855+ // This was disabled because it was firing when it shouldn't
856+ // The original logic prevented moving relations with bindings
857+ // if (isCustomArrowShape(prevShape)) {
858+ // const bindings = editor.getBindingsFromShape(
859+ // prevShape,
860+ // prevShape.type,
861+ // );
862+ // const isTranslating = editor.isIn("select.translating");
863+ // if (bindings.length && isTranslating) {
864+ // editor.setSelectedShapes([]);
865+ // toasts.addToast({
866+ // id: "tldraw-toast-cannot-move-relation",
867+ // title: "Cannot move relation.",
868+ // severity: "warning",
869+ // });
870+ // return prevShape;
871+ // }
872+ // }
871873 return nextShape ;
872874 } ,
873875 ) ;
You can’t perform that action at this time.
0 commit comments