Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private addTools(link: any) {
var toolsView = new joint.dia.ToolsView({
tools: [new joint.linkTools.TargetArrowhead()]
});
link.findView(this.paper).addTools(toolsView);
}
private bindToolEvents() {
this.paper.on("link:mouseover", function(cellView, evt) {
var verticesTool = new joint.linkTools.Vertices({
focusOpacity: 0.5,
redundancyRemoval: true,
snapRadius: 20,
vertexAdding: true,
});
var segmentsTool = new joint.linkTools.Segments();
var sourceArrowheadTool = new joint.linkTools.SourceArrowhead();
var targetArrowheadTool = new joint.linkTools.TargetArrowhead();
var toolsView = new joint.dia.ToolsView({
tools: [
verticesTool, segmentsTool,
sourceArrowheadTool, targetArrowheadTool
]
});
this.paper.on("link:mouseover", function(cellView, evt) {
var verticesTool = new joint.linkTools.Vertices({
focusOpacity: 0.5,
redundancyRemoval: true,
snapRadius: 20,
vertexAdding: true,
});
var segmentsTool = new joint.linkTools.Segments();
var sourceArrowheadTool = new joint.linkTools.SourceArrowhead();
var targetArrowheadTool = new joint.linkTools.TargetArrowhead();
var toolsView = new joint.dia.ToolsView({
tools: [
verticesTool, segmentsTool,
sourceArrowheadTool, targetArrowheadTool
]
});
cellView.addTools(toolsView)
cellView.showTools()
});