You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Under the full Odin spec, all Links (both Events and Relations) have
one main label and individual type labels for each argument. Both types
of labels should be drawn for all Links.
(Previously, Event Links only had their argument labels drawn, and
Relation Links only had their main label drawn).
- Parse: Odin parses now include both label types for all Links
- Link: Both label types are initialised for all Links, but the ones not
in use are hidden for now.
- Config: Increased the Link slot interval in preparation for showing
argument labels along the vertical lines
this.handles = []; // SVG Path and last-drawn path string
38776
38776
38777
38777
this.path = null;
38778
-
this.lastPathString = "";
38779
-
this.svgTexts = [];
38780
-
this.lastDrawnWidth = null;
38778
+
this.lastPathString = ""; // (Horizontal-only) width of the last drawn line for this Link; used
38779
+
// for calculating Handle positions for parent Links
38780
+
38781
+
this.lastDrawnWidth = null; // SVG Texts for main Link label / argument labels
38782
+
38783
+
this.argTexts = [];
38784
+
this.linkText = null;
38781
38785
}
38782
38786
/**
38783
38787
* Initialises this Link against the main API instance
@@ -38796,41 +38800,38 @@ function () {
38796
38800
this.svg = main.svg.group().addClass("tag-element").addClass(this.top ? "link" : "link syntax-link"); // Links are hidden by default; the main function should call `.show()`
38797
38801
// for any Links to be shown
38798
38802
38799
-
this.svg.hide(); // Init handles
38803
+
this.svg.hide(); // Init handles and SVG texts.
38804
+
// If there is a trigger, it will be the first handle
_this2.handles.push(new Handle(arg.anchor, _this2)); // Also prepare svgTexts for each trigger-argument relation
38808
+
} // Arguments
38807
38809
38808
38810
38809
-
if (_this2.trigger) {
38810
-
var text = _this2.svg.text(arg.type).leading(1).addClass("tag-element").addClass("link-text"); // Transform the text based on its font-size so that we can position it
var text = this.svg.text(this.reltype).leading(1).addClass("tag-element").addClass("link-text"); // Transform the text based on its font-size so that we can position it
38814
+
var text = _this2.svg.text(arg.type).leading(1).addClass("tag-element").addClass("link-text"); // Transform the text based on its font-size so that we can position it
38824
38815
// relative to its baseline
38825
38816
38817
+
38826
38818
text.transform({
38827
38819
y: -parseInt($(text.node).css("font-size")) + 1
38828
38820
});
38829
-
this.svgTexts.push(text);
38830
-
} // apply click events to text
38821
+
text.hide();
38822
+
38823
+
_this2.argTexts.push(text);
38824
+
}); // Main Link label
38831
38825
38826
+
this.linkText = this.svg.text(this.reltype).leading(1).addClass("tag-element").addClass("link-text"); // Transform the text based on its font-size so that we can position it
0 commit comments