Skip to content

Commit 24704ca

Browse files
committed
Links: Bugfix
- Links: Dragging nested Link handles now properly constrains the handles of their parent Links again - Styles: Slight modifications to link label backgrounds
1 parent eee857a commit 24704ca

File tree

11 files changed

+23
-28
lines changed

11 files changed

+23
-28
lines changed

demo/demo.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/demo.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/demo.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/tag/css/tag.css

Lines changed: 1 addition & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/tag/css/tag.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/tag/css/tag.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/tag/css/tag.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/tag/js/tag.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39189,6 +39189,7 @@ function () {
3918939189
});
3919039190
parentHandle.offset += growth;
3919139191
parentHandle.offset = Math.max(parentHandle.offset, 0);
39192+
parentLink.draw(this);
3919239193
}
3919339194
} catch (err) {
3919439195
_didIteratorError4 = true;
@@ -40195,19 +40196,18 @@ function () {
4019540196
/** @type svgjs.Text */
4019640197

4019740198
this.svgText = this.svg.text(text).leading(1).addClass("tag-element").addClass("link-text").addClass(addClass); // Transform the text based on its font-size so that we can position it
40198-
// relative to its baseline
40199+
// relative to its baseline (with a bit of a fudge factor)
4019940200

4020040201
this.fontSize = parseInt($(this.svgText.node).css("font-size"));
4020140202
this.svgText.transform({
40202-
y: -this.fontSize
40203-
});
40204-
this.svgTextBbox = this.svgText.bbox(); // Background (rectangle)
40203+
y: -this.fontSize + 1
40204+
}); // Background (rectangle)
4020540205

40206-
this.svgBackground = this.svg.rect(this.svgTextBbox.width, this.svgTextBbox.height - 4).addClass("tag-element").addClass("link-text-bg").addClass(addClass).radius(2).back(); // Transform the rectangle to sit nicely behind the label
40206+
this.svgBackground = this.svg.rect(this.svgText.length() + 2, this.fontSize + 2).addClass("tag-element").addClass("link-text-bg").addClass(addClass).radius(2.5).back(); // Transform the rectangle to sit nicely behind the label
4020740207

4020840208
this.svgBackground.transform({
40209-
x: -this.svgTextBbox.width / 2,
40210-
y: -this.fontSize + 2
40209+
x: -this.svgText.length() / 2 - 1,
40210+
y: -this.fontSize + 2.5
4021140211
}); // // Background (text)
4021240212
// this.svgBackground = this.svg.text(text)
4021340213
// .addClass("tag-element")

dist/tag/js/tag.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/css/tag.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@
8383

8484
.link-text-bg {
8585
fill: #ffffff;
86-
stroke-width: 3px;
87-
stroke: #ffffff;
8886
}
8987

9088
.link.syntax-link {

0 commit comments

Comments
 (0)