Skip to content

Commit 39d8a48

Browse files
committed
The width and height from the bounds-attribute on the nodes are now used if the attribute is present.
1 parent e2ee82f commit 39d8a48

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
## Version 1.1.1
4+
5+
- The width and height from the bounds-attribute on the nodes are now used if the attribute is present.
6+
37
## Version 1.1.0
48

59
- New layout: Fixed. If the nodes in the dgml file has bounds-attributes then the nodes are laid out using these coordinates.

src/model/Node.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ export class Node {
5959
if (this.categoryRef !== undefined && this.stroke === undefined && this.categoryRef.stroke !== undefined) { jsStringColorProperties.push(`border: "${this.categoryRef.stroke}"`); }
6060
if (jsStringColorProperties.length > 0) { jsStringProperties.push(`color: { ${jsStringColorProperties.join(', ')} }`); }
6161
if (this.boundsX !== undefined && this.boundsY !== undefined) { jsStringProperties.push(`x: ${this.boundsX}, y: ${this.boundsY}, fixed: { x: true, y: true}`); }
62+
if (this.boundsWidth !== undefined) { jsStringProperties.push(`widthConstraint: { minimum: ${this.boundsWidth} }`) }
63+
if (this.boundsHeight !== undefined) { jsStringProperties.push(`heightConstraint: { minimum: ${this.boundsHeight}, valign: top }`) }
6264
return `{${jsStringProperties.join(', ')}}`;
6365
}
6466

0 commit comments

Comments
 (0)