Class SnapGrid

Constructors

Accessors

Methods

Constructors

  • Creates a new SnapGrid instance

    Parameters

    • board: Board

      The [[Board]]

    Returns SnapGrid

    Example

    editor.snapGrid.setOffset(10)
    

    Example

    editor.snapGrid.setOptions({
    stroke: '#fff',
    strokeWidth: 2
    })

    Example

    editor.snapGrid.disable()
    

    Example

    editor.snapGrid.enable()
    

Accessors

  • get isActive(): boolean
  • Returns the active state of the snap grid

    Returns boolean

Methods

  • Disables snap grid

    Returns void

  • Enables snap grid

    Returns void

  • Sets offset to the given value

    Parameters

    • offset: number

      the offset value

    Returns void

    Example

    editor.snapGrid.setOffset(5)
    
  • Updates configs of guide line

    Parameters

    • options: LineConfig

      the line config

    Returns void

    Example

    editor.snapGrid.setOptions({
    stroke: '#262626',
    strokeWidth: 2
    })