File tree Expand file tree Collapse file tree
src/widgets/visualAuthoring Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
77#### 🐛 Fixed
88- Fix stale rendering (i.e. missing links after moving an endpoint until an element move) due to the lost scheduled layer updates.
99- Fix unable to scroll inside canvas components and templates when ` requireCtrl ` in ` zoomOptions ` is set ` false ` .
10+ - Disallow moving relation source or target to another entity in authoring mode if the relation after move already exists on the canvas.
1011- Disable changing an entity IRI in a form when ` MetadataProvider.canModifyEntity() ` disallows it.
1112- Move link vertices together with source and target elements if both are selected in ` Selection ` component.
1213
Original file line number Diff line number Diff line change @@ -113,11 +113,17 @@ export function DragEditLayer(props: DragEditLayerProps) {
113113 return new EntityDragConnection ( [ ] , workspace ) ;
114114 }
115115
116+ const linkTypeId = link . data . linkTypeId === PlaceholderRelationType
117+ ? undefined : link . data . linkTypeId ;
118+ if ( target && linkTypeId && model . findLink ( linkTypeId , source . id , target . id ) ) {
119+ // Link already exists
120+ return new EntityDragConnection ( [ ] , workspace ) ;
121+ }
122+
116123 const canConnect = await metadataProvider . canConnect (
117124 source . data ,
118125 target ?. data ,
119- link . data . linkTypeId === PlaceholderRelationType
120- ? undefined : link . data . linkTypeId ,
126+ linkTypeId ,
121127 { signal}
122128 ) ;
123129 return new EntityDragConnection ( canConnect , workspace ) ;
You can’t perform that action at this time.
0 commit comments