MarkupSelected Class


The set of currently selected SVG elements. When elements are added to the set, they are hilited.


Name Description
constructor(svg: G): MarkupSelected    
add(el: MarkupElement): void Add a new element to the SS  
clearEditors(): void    
deleteAll(undo: UndoManager): void    
drop(el: MarkupElement): boolean Remove an element from the selection set and unhilite it.  
emptyAll(): void    
groupAll(undo: UndoManager): void    
has(el: MarkupElement): boolean    
replace(oldEl: MarkupElement, newEl: MarkupElement): void Replace an entry in the selection set with a different element.  
reposition(cmdName: string, undo: UndoManager, fn: (el: MarkupElement) => void): void Move all of the entries to a new position in the DOM via a callback.  
restart(el?: MarkupElement): void    
sizeChanged(): void    
ungroupAll(undo: UndoManager): void    


Name Type Description
elements Set<Element>    
handles undefined | Handles    
isEmpty Accessor ReadOnly boolean    
onChanged BeEvent<(selected: MarkupSelected) => void> Called whenever elements are added or removed from this SelectionSet  
size Accessor ReadOnly number    
svg ConstructorProperty G    

Defined in

Last Updated: 20 September, 2019