MCPcopy
hub / github.com/clientIO/joint / addTools

Function addTools

examples/fta-js/src/index.js:574–586  ·  view source on GitHub ↗
(paper, elements)

Source from the content-addressed store, hash-verified

572}
573
574function addTools(paper, elements) {
575 const toolName = 'expand-tools';
576 elements.forEach(function(element) {
577 if (element.get('type') !== 'fta.IntermediateEvent') return;
578 const view = element.findView(paper);
579 if (view.hasTools(toolName)) return;
580 const toolsView = new dia.ToolsView({
581 name: toolName,
582 tools: [new ExpandButton()],
583 });
584 view.addTools(toolsView);
585 });
586}

Callers 1

index.jsFile · 0.70

Calls 2

getMethod · 0.45
addToolsMethod · 0.45

Tested by

no test coverage detected