A container for all the SVG elements, and methods to manage adding and finding elements. Each page of the score has its own SVG element.

### Hierarchy

- SvgPageMap

## Index

### Constructors

- constructor

### Methods

- addArtifact
- addModifierTab
- clientToSvg
- createRenderers
- findArtifact
- findModifierTabs
- getRenderer
- getRendererForPage
- getRendererFromModifier
- getRendererFromPoint
- removePage
- svgToClient
- updateContainerOffset
- updateLayout

## Constructors

### constructor

- new SvgPageMap(layout: SmoGlobalLayout, container: HTMLElement, pages: SmoPageLayout[]): SvgPageMap

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

  #### Parameters

  - ##### layout: SmoGlobalLayout

    defines the page width/height and relative zoom common to all the pages

  - ##### container: HTMLElement

    the parent DOM element that contains all the pages

  - ##### pages: SmoPageLayout[]

    the layouts (margins, etc) for each pages.

  #### Returns SvgPageMap

## Methods

### addArtifact

- addArtifact(selection: SmoSelection): void

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

  add a rendered page to the page map

  #### Parameters

  - ##### selection: SmoSelection

  #### Returns void

### addModifierTab

- addModifierTab(modifier: ModifierTab): void

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

  add a rendered modifier to the page map

  #### Parameters

  - ##### modifier: ModifierTab

  #### Returns void

### clientToSvg

- clientToSvg(box: SvgBox): SvgBox

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

  Convert from screen/client event to SVG space. We assume the scroll offset is already added to `box`

  #### Parameters

  - ##### box: SvgBox

  #### Returns SvgBox

### createRenderers

- createRenderers(): void

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

  create/re-create all the page SVG elements

  #### Returns void

### findArtifact

- findArtifact(box: SvgBox): {}

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

  Find a selection from a mouse event

  #### Parameters

  - ##### box: SvgBox

    location of a mouse event or specific screen coordinates

  #### Returns {}

### findModifierTabs

- findModifierTabs(box: SvgBox): ModifierTab[]

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

  Find any modifiers intersecting with `box`

  #### Parameters

  - ##### box: SvgBox

  #### Returns ModifierTab[]

### getRenderer

- getRenderer(box: SvgPoint | SvgBox): SvgPage

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

  Return the SvgPage based on SVG point (conversion from client coordinates already done)

  #### Parameters

  - ##### box: SvgPoint | SvgBox

  #### Returns SvgPage

### getRendererForPage

- getRendererForPage(page: number): SvgPage

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

  Return the page by index

  #### Parameters

  - ##### page: number

  #### Returns SvgPage

### getRendererFromModifier

- getRendererFromModifier(modifier?: Renderable): SvgPage

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

  Return the page based on the coordinates of a modifier

  #### Parameters

  - ##### Optional modifier: Renderable

  #### Returns SvgPage

### getRendererFromPoint

- getRendererFromPoint(point: SvgPoint): null | SvgPage

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

  Return the SvgPage based on SVG point (conversion from client coordinates already done)

  #### Parameters

  - ##### point: SvgPoint

  #### Returns null | SvgPage

### removePage

- removePage(): void

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

  The number of pages is changing, remove the last page

  #### Returns void

### svgToClient

- svgToClient(box: SvgBox): SvgBox

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

  Convert from SVG bounding box to screen coordinates

  #### Parameters

  - ##### box: SvgBox

  #### Returns SvgBox

### updateContainerOffset

- updateContainerOffset(scrollPoint: SvgPoint): void

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

  Update the offset of the music container DOM element, in client coordinates. This is used when converting absolute screen coordinates (like from a mouse event) to SVG coordinates

  #### Parameters

  - ##### scrollPoint: SvgPoint

  #### Returns void

### updateLayout

- updateLayout(layout: SmoGlobalLayout, pageLayouts: SmoPageLayout[]): void

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

  The score dimensions have changed, clear maps and recreate the pages.

  #### Parameters

  - ##### layout: SmoGlobalLayout

  - ##### pageLayouts: SmoPageLayout[]

  #### Returns void

Generated using TypeDoc