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 @@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- Avoid marking grouped relation as "layout only" when importing a diagram (only grouped relation links themselves).
- Fix being unable to pan the canvas in Firefox when an graph element with a scrollbar inside was present.
- Fix a freeze when opening a class tree in authoring mode when `MetadataProvider.filterConstructibleTypes()` returns without any delay.
- Fix calling `MetadataProvider.canConnect()` with only source and without target when dragging over an element to establish a new link.
- Fix `flushSync was called from inside a lifecycle method` React warning when calling `centerTo()`, `centerContent()`, `zoomToFit()` on `CanvasApi` from a lifecycle method.
- Use default property editor for entities or relations when `VisualAuthoring.propertyEditor` returns `undefined`.
- Fix `prepareLabels` option for `SparqlDataProvider` to be applied for `knownElementTypes()`, `knownLinkTypes()`, `elementTypes()`, `linkTypes()`, `propertyTypes()` and `elements`.
Expand Down
8 changes: 4 additions & 4 deletions src/widgets/visualAuthoring/dragEditLayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,17 +110,17 @@ export function DragEditLayer(props: DragEditLayerProps) {
(!target || target instanceof EntityElement) &&
(!targetEvent || targetEvent.type !== 'entityDelete')
)) {
return new EnitityDragConnection([], workspace);
return new EntityDragConnection([], workspace);
}

const canConnect = await metadataProvider.canConnect(
source.data,
undefined,
target?.data,
link.data.linkTypeId === PlaceholderRelationType
? undefined : link.data.linkTypeId,
{signal}
);
return new EnitityDragConnection(canConnect, workspace);
return new EntityDragConnection(canConnect, workspace);
},
[metadataProvider]
);
Expand All @@ -147,7 +147,7 @@ export function DragEditLayer(props: DragEditLayerProps) {
);
}

class EnitityDragConnection implements DragLinkConnection {
class EntityDragConnection implements DragLinkConnection {
constructor(
private readonly connections: ReadonlyArray<MetadataCanConnect>,
private readonly workspace: WorkspaceContext
Expand Down