Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SvgPage

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

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

Accessors

  • get modifierDivs(): number

Methods

  • clearMap(): void
  • divIndex(y: number): number
  • getContext(): any
  • offsetBbox(element: SVGSVGElement): SvgBox
  • 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

Generated using TypeDoc