Markup Class

The current markup being created/edited. Holds the SVG elements, plus the active MarkupTool. When starting a Markup, a new Div is added as a child of the ScreenViewport's vpDiv.

Methods

Name Description
constructor(vp: ScreenViewport, markupData?: MarkupSvgData): Markup Create a new Markup for the supplied ScreenViewport.  
bringToFront(): void Bring all the entries in the selection set to the front.  
createArrowMarker(color: string, length: number, width: number): @svgdotjs/svg.js.Marker Get an existing or create a new reusable symbol representing an arrow head.  
deleteSelected(): void Delete all the entries in the selection set, then empty it.  
destroy(): void Called when the Markup is destroyed  
disablePick(): void Turn off picking the markup elements in the markup view  
enablePick(): void Turn on picking the markup elements in the markup view  
groupSelected(): void Group all the entries in the selection set, then select the group.  
isBoxedText(el: @svgdotjs/svg.js.Element): boolean Check if the supplied MarkupElement is a group of MarkupText and the MarkupText's outline Rect.  
sendToBack(): void Send all the entries in the selection set to the back.  
setCursor(cursor: string): void Change the default cursor for the markup view  
ungroupSelected(): void Ungroup all the group entries in the selection set.  

Properties

Name Type Description
selected Readonly MarkupSelected The set of currently selected markup elements  
undo Readonly UndoManager Support undo/redo of markup operations  
vp ScreenViewport    

Defined in

Last Updated: 21 November, 2024