Skip to content

How to prevent creating link vertices on double clicking link labels? #2370

Answered by kumilingus
fafeitsch asked this question in Q&A
Discussion options

You must be logged in to vote

The only option now I can think of is to set the labelsLayer paper's option to true and move the label's layer <g/> element after the tool's layer element.

const paper = new dia.Paper({
   /* ... */
   labelsLayer: true
});
// Move the labels layer in front of the tools layer
// so the labels are not covered by the tools.
const labelsLayerEl = paper.getLayerNode(dia.Paper.Layers.LABELS);
labelsLayerEl.parentNode.appendChild(labelsLayerEl);

Note: This will be more elegant once we introduce an official Layer API.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@fafeitsch
Comment options

Answer selected by fafeitsch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants