Skip to content

Commit 057f5af

Browse files
authored
Fix marking AnnotationLink with TemplateProperties.LayoutOnly on import (#129)
1 parent bd07f73 commit 057f5af

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
1111
- Disable changing an entity IRI in a form when `MetadataProvider.canModifyEntity()` disallows it.
1212
- Move link vertices together with source and target elements if both are selected in `Selection` component.
1313
- Re-validate entities and links with `ValidationProvider` when added or removed via undo/redo.
14+
- Fix marking `AnnotationLink` with `TemplateProperties.LayoutOnly` when importing a diagram layout.
1415

1516
#### 💅 Polish
1617
- Remove superfluous "Type" fields from the default "Edit entity" dialog.

src/editor/annotationCells.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { LinkTypeIri } from '../data/model';
2-
import { TemplateState } from '../data/schema';
2+
import { TemplateProperties, TemplateState } from '../data/schema';
33

44
import { Element, Link } from '../diagram/elements';
55

@@ -71,9 +71,9 @@ export class AnnotationLink extends Link {
7171
sourceId: options.source.id,
7272
targetId: options.target.id,
7373
vertices,
74-
linkState: options.mapTemplateState(
75-
TemplateState.fromJSON(linkState)
76-
),
74+
linkState: options
75+
.mapTemplateState(TemplateState.fromJSON(linkState))
76+
.set(TemplateProperties.LayoutOnly, undefined),
7777
});
7878
}
7979

0 commit comments

Comments
 (0)