Foundry Virtual Tabletop - API Documentation - Version 14
    Preparing search index...

    Class ShapeControls<DocumentClass, ObjectClass, LayerClass, ShapeClass>

    Controls for a shape.

    Type Parameters

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    editable: boolean = true

    Are the controls editable?

    true
    
    renderFlags: RenderFlags

    Status flags which are applied at render-time to update the PlaceableObject. If an object defines RenderFlags, it should at least include flags for "redraw" and "refresh".

    RENDER_FLAG_PRIORITY: string = "INTERFACE"
    RENDER_FLAGS: { redraw: { propagate: string[] }; refresh: {} } = ...

    Accessors

    • get border(): Graphics

      The border of the shape.

      Returns Graphics

    • get dashed(): boolean

      Is the border dashed?

      Returns boolean

      false
      
    • get tint(): number

      The tint applied to these controls.

      Returns number

      0xFFFFFF
      

    Methods

    • Parameters

      • event: any

      Returns void

    • Returns void

    • Parameters

      • options: any

      Returns void

    • Refresh the visualization of these controls.

      Returns void

    • Protected

      Can the handle be dragged?

      Parameters

      • event: FederatedEvent<UIEvent | PixiTouch>

        The pointer event

      • Optionaloptions: { notify: boolean }

        Options, used internally

      Returns boolean

    • Protected

      Clear these controls.

      Returns void

    • Protected

      Draw these controls.

      Returns Promise<void>

    • Protected

      Draw the shape.

      Parameters

      • graphics: Graphics

      Returns void

    • Protected

      Handle the double left-click event of a handle.

      Parameters

      • event: FederatedEvent<UIEvent | PixiTouch>

        The pointer event.

      Returns void

    • Protected

      Handle the drag cancel event of a handle.

      Parameters

      • event: FederatedEvent<UIEvent | PixiTouch>

        The pointer event.

      Returns void

    • Protected

      Handle the drag move event of a handle.

      Parameters

      • event: FederatedEvent<UIEvent | PixiTouch>

        The pointer event.

      Returns void

    • Protected

      Handle the drag start event of a handle.

      Parameters

      • event: FederatedEvent<UIEvent | PixiTouch>

        The pointer event.

      Returns void

    • Protected

      Prepare the database update that should occur as the result of a drop operation.

      Parameters

      • event: FederatedEvent<UIEvent | PixiTouch>

        The pointer event.

      Returns object | [data: object, options?: object]

      The update data and options (optional)

    • Protected

      Refresh the visualization of these controls.

      Returns void

    • Protected

      Update the drag preview. Called when the shape has changed.

      Parameters

      • event: FederatedEvent<UIEvent | PixiTouch>

        The pointer event.

      Returns void

    • Internal

      Create and draw the drag preview for a placeable object.

      Parameters

      • object: ObjectClass

        The original placeable object

      Returns ObjectClass

      The preview of the placeable object.