The Comment Pin component allows you to manually set the position of Comment Annotations. This feature is particularly useful for complex UIs where you need precise control over the placement of Comment Pins. Implementing this feature involves: 1. Adding comment: You have two options for adding comments with custom positioning:Documentation Index
Fetch the complete documentation index at: https://docs.velt.dev/llms.txt
Use this file to discover all available pages before exploring further.
-
a. Velt-Managed Click Events: Use the
onCommentAddmethod to incorporate custom metadata into the comment object. This metadata will be used later to position the Comment Pin. Learn more -
b. Custom Click Event Handling: Handle click events on your canvas and use the
addManualCommentmethod to create a comment with custom metadata. Learn more
getAllCommentAnnotations method to fetch all Comment Annotations with their associated custom metadata.
For React developers, we provide hooks for easier integration. Learn more
3. Rendering comments Pins:
Iterate through the retrieved annotations and render the Comment Pin component, using the custom metadata to set each pin’s position.
