Add loop label tooltip to graph with help cursor
This commit is contained in:
parent
26779038aa
commit
71489c5f67
@ -53,12 +53,19 @@ export default {
|
|||||||
// be matched.
|
// be matched.
|
||||||
loopLabel() {
|
loopLabel() {
|
||||||
var labelStr = this.repeat.label,
|
var labelStr = this.repeat.label,
|
||||||
label, labelBox, box;
|
tooltipStr = this.repeat.tooltip,
|
||||||
|
label, tooltip, labelBox, box;
|
||||||
|
|
||||||
if (labelStr) {
|
if (labelStr) {
|
||||||
label = this.container.text(0, 0, [labelStr])
|
label = this.container.text(0, 0, [labelStr])
|
||||||
.addClass('repeat-label');
|
.addClass('repeat-label');
|
||||||
|
|
||||||
|
if (tooltipStr) {
|
||||||
|
tooltip = Snap().el('title')
|
||||||
|
.append(this.container.text(0, 0, tooltipStr));
|
||||||
|
label.append(tooltip);
|
||||||
|
}
|
||||||
|
|
||||||
box = this.getBBox();
|
box = this.getBBox();
|
||||||
labelBox = label.getBBox();
|
labelBox = label.getBBox();
|
||||||
label.transform(Snap.matrix().translate(
|
label.transform(Snap.matrix().translate(
|
||||||
|
@ -50,6 +50,10 @@ circle {
|
|||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.repeat-label {
|
||||||
|
cursor: help;
|
||||||
|
}
|
||||||
|
|
||||||
.subexp .subexp-label tspan,
|
.subexp .subexp-label tspan,
|
||||||
.charset .charset-label tspan {
|
.charset .charset-label tspan {
|
||||||
dominant-baseline: text-after-edge;
|
dominant-baseline: text-after-edge;
|
||||||
|
Loading…
Reference in New Issue
Block a user