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.
|
||||
loopLabel() {
|
||||
var labelStr = this.repeat.label,
|
||||
label, labelBox, box;
|
||||
tooltipStr = this.repeat.tooltip,
|
||||
label, tooltip, labelBox, box;
|
||||
|
||||
if (labelStr) {
|
||||
label = this.container.text(0, 0, [labelStr])
|
||||
.addClass('repeat-label');
|
||||
|
||||
if (tooltipStr) {
|
||||
tooltip = Snap().el('title')
|
||||
.append(this.container.text(0, 0, tooltipStr));
|
||||
label.append(tooltip);
|
||||
}
|
||||
|
||||
box = this.getBBox();
|
||||
labelBox = label.getBBox();
|
||||
label.transform(Snap.matrix().translate(
|
||||
|
@ -50,6 +50,10 @@ circle {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.repeat-label {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
.subexp .subexp-label tspan,
|
||||
.charset .charset-label tspan {
|
||||
dominant-baseline: text-after-edge;
|
||||
|
Loading…
Reference in New Issue
Block a user