Each page is a different SVG element, with its own offset within the DOM. This makes partial updates faster. SvgPage keeps track of all musical elements in SelectionMaps. staff and score modifiers are kept in seperate lists since they may span multiple musical elements (e.g. slurs, text elements).

### Hierarchy

- SvgPage

## Index

### Constructors

- constructor

### Accessors

- modifierDivs

### Methods

- addArtifact
- addModifierTab
- clearMap
- clearMeasure
- divIndex
- findArtifact
- findModifierTabs
- getContext
- offsetBbox
- offsetSvgBox
- offsetSvgPoint

## Constructors

### constructor

- new SvgPage(renderer: any, pageNumber: number, box: SvgBox): SvgPage

- - Defined in src/render/sui/svgPageMap.ts:213

  #### Parameters

  - ##### renderer: any

  - ##### pageNumber: number

  - ##### box: SvgBox

  #### Returns SvgPage

## Accessors

### Static modifierDivs

- get modifierDivs(): number

- - Defined in src/render/sui/svgPageMap.ts:200

  Modifiers are divided into `modifierDivs` vertical rectangles for event lookup.

  #### Returns number

## Methods

### addArtifact

- addArtifact(selection: SmoSelection): void

- - Defined in src/render/sui/svgPageMap.ts:277

  Add a new selection to the page

  #### Parameters

  - ##### selection: SmoSelection

  #### Returns void

### addModifierTab

- addModifierTab(modifier: ModifierTab): void

- - Defined in src/render/sui/svgPageMap.ts:264

  add a modifier to the page, indexed by its rectangle

  #### Parameters

  - ##### modifier: ModifierTab

  #### Returns void

### clearMap

- clearMap(): void

- - Defined in src/render/sui/svgPageMap.ts:234

  Remove all elements and modifiers in this page, for a redraw.

  #### Returns void

### clearMeasure

- clearMeasure(selection: SmoSelection): void

- - Defined in src/render/sui/svgPageMap.ts:243

  Clear mapped objects associated with a measure, including any modifiers that span that measure.

  #### Parameters

  - ##### selection: SmoSelection

  #### Returns void

### divIndex

- divIndex(y: number): number

- - Defined in src/render/sui/svgPageMap.ts:228

  Given SVG y, return the div for modifiers

  #### Parameters

  - ##### y: number

  #### Returns number

### findArtifact

- findArtifact(box: SvgBox): SmoSelection[]

- - Defined in src/render/sui/svgPageMap.ts:285

  Try to find a selection on this page, based on the mouse event

  #### Parameters

  - ##### box: SvgBox

  #### Returns SmoSelection[]

### findModifierTabs

- findModifierTabs(box: SvgBox): ModifierTab[]

- - Defined in src/render/sui/svgPageMap.ts:293

  Try to find a modifier on this page, based on the mouse event

  #### Parameters

  - ##### box: SvgBox

  #### Returns ModifierTab[]

### getContext

- getContext(): any

- - Defined in src/render/sui/svgPageMap.ts:207

  This is the VextFlow renderer context (SVGContext)

  #### Returns any

### offsetBbox

- offsetBbox(element: SVGSVGElement): SvgBox

- - Defined in src/render/sui/svgPageMap.ts:314

  Measure the bounding box of an element. Return the box as if the top of the first page were 0,0. Bounding boxes are stored in absolute coordinates from the top of the first page. When rendering elements, we adjust the coordinates for hte local page.

  #### Parameters

  - ##### element: SVGSVGElement

  #### Returns SvgBox

### offsetSvgBox

- offsetSvgBox(box: SvgBox): {}

- - Defined in src/render/sui/svgPageMap.ts:325

  Adjust the bounding box to local coordinates for this page.

  #### Parameters

  - ##### box: SvgBox

  #### Returns {}

### offsetSvgPoint

- offsetSvgPoint(box: SvgPoint): {}

- - Defined in src/render/sui/svgPageMap.ts:333

  Adjust the point to local coordinates for this page.

  #### Parameters

  - ##### box: SvgPoint

  #### Returns {}

Generated using TypeDoc