Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
#### 🐛 Fixed
- Fix stale rendering (i.e. missing links after moving an endpoint until an element move) due to the lost scheduled layer updates.
- Fix unable to scroll inside canvas components and templates when `requireCtrl` in `zoomOptions` is set `false`.
- Disallow moving relation source or target to another entity in authoring mode if the relation after move already exists on the canvas.
- Disable changing an entity IRI in a form when `MetadataProvider.canModifyEntity()` disallows it.
- Move link vertices together with source and target elements if both are selected in `Selection` component.

Expand Down
10 changes: 8 additions & 2 deletions src/widgets/visualAuthoring/dragEditLayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,17 @@ export function DragEditLayer(props: DragEditLayerProps) {
return new EntityDragConnection([], workspace);
}

const linkTypeId = link.data.linkTypeId === PlaceholderRelationType
? undefined : link.data.linkTypeId;
if (target && linkTypeId && model.findLink(linkTypeId, source.id, target.id)) {
// Link already exists
return new EntityDragConnection([], workspace);
}

const canConnect = await metadataProvider.canConnect(
source.data,
target?.data,
link.data.linkTypeId === PlaceholderRelationType
? undefined : link.data.linkTypeId,
linkTypeId,
{signal}
);
return new EntityDragConnection(canConnect, workspace);
Expand Down
Loading