Articles in this section

How to disable default tooltips for node and connector in Angular Diagram

This article explains how to disable default tooltips for node and connector in angular diagram. By default, when you interact with node or connector in the diagram- such a dragging, resizing or rotating-you’ll see a tooltip that displays information, including the node’s position, size and angle.

If you’d like to disable the default tooltip that appears while interacting with nodes or connectors can be disabled by removing the tooltip constraints from the SelectorConstraints of the selectedItems property of the diagram.

Below is a code example demonstrating how to disable the default tooltip:

template: `<ejs-diagram #diagram id="diagram" width="100%" height="580px" [getNodeDefaults]="getNodeDefaults" [constraints]="constraints"  [selectedItems]='selectedItems'>
       <e-nodes>
           <e-node id='node1' [offsetX]=350 [offsetY]=150>
           <e-node-annotations>
                   <e-node-annotation content="Default tooltip disabled">
                   </e-node-annotation>
               </e-node-annotations>
           </e-node>
       </e-nodes>
       <e-connectors>
           <e-connector id='connector' type='Straight' [sourcePoint]='sourcePoint' [targetPoint]='targetPoint'>
           <e-connector-annotations>
                   <e-connector-annotation content="Default tooltip disabled">
                   </e-connector-annotation>
               </e-connector-annotations>
           </e-connector>
       </e-connectors>
   </ejs-diagram>`,
   encapsulation: ViewEncapsulation.None
})
export class AppComponent {
   @ViewChild("diagram")
   public constraints?: DiagramConstraints;
   public selectedItems?: SelectorModel;
   ngOnInit(): void {
         //To disable default tooltip
       this.selectedItems = { constraints: SelectorConstraints.All & ~SelectorConstraints.ToolTip };
   }
} 

Refer to the working sample for additional details and implementation: Sample

Conclusion

We hope you enjoyed learning about how to disable default tooltips for node and connector in Angular Diagram.

You can refer to our Angular Diagram feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our Angular Diagram example to understand how to create and manipulate data.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion®, you can try our 30-day free trial to check out our controls. If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, BoldDesk Support, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied