The ShapeController is responsible for all communication regarding Shapes. Methods inside this controller can be called by window.SDK.shape.{method-name}

Hierarchy

  • ShapeController

Methods

  • This method will set the visibility of the shape fill.

    Returns

    Parameters

    • id: string

      the id of the shapeFrame that needs to get updated.

    • enableFill: boolean

      Whether the shape fill is visible.

    Returns Promise<EditorResponse<null>>

  • This method will set the visibility of the shape stroke.

    Returns

    Parameters

    • id: string

      the id of the shapeFrame that needs to get updated.

    • enableStroke: boolean

      Whether the shape stroke is visible.

    Returns Promise<EditorResponse<null>>

  • This method will set the flag to change the way the rectangle shape corners will be changed: all at once or separately.

    Returns

    Parameters

    • id: string

      the id of the shapeFrame that needs to get updated.

    • allCornersSame: boolean

      the new flag that you want to set to the shapeFrame.

    Returns Promise<EditorResponse<null>>

  • This method will set the radius for all corners of the rectangle and polygon shapes

    Returns

    Parameters

    • id: string

      the id of the shapeFrame that needs to get updated.

    • radius: number

      A radius to update all corners at once;

    Returns Promise<EditorResponse<null>>

  • This method will set the radius for the bottom left corner of the rectangle shape

    Returns

    Parameters

    • id: string

      the id of the shapeFrame that needs to get updated.

    • radius: number

      A radius to update the bottom left corner;

    Returns Promise<EditorResponse<null>>

  • This method will set the radius for the bottom right corner of the rectangle shape

    Returns

    Parameters

    • id: string

      the id of the shapeFrame that needs to get updated.

    • radius: number

      A radius to update the bottom right corner;

    Returns Promise<EditorResponse<null>>

  • This method will set the radius for the top left corner of the rectangle shape

    Returns

    Parameters

    • id: string

      the id of the shapeFrame that needs to get updated.

    • radius: number

      A radius to update the top left corner;

    Returns Promise<EditorResponse<null>>

  • This method will set the radius for the top right corner of the rectangle shape

    Returns

    Parameters

    • id: string

      the id of the shapeFrame that needs to get updated.

    • radius: number

      A radius to update the top right corner;

    Returns Promise<EditorResponse<null>>

  • This method will set the shape stroke color of a specified shape frame.

    Returns

    Parameters

    • id: string

      the id of the shapeFrame that needs to get updated.

    • strokeColor: ColorUsage

      the new shape stroke color that you want to set to the shapeFrame.

    Returns Promise<EditorResponse<null>>

  • This method will set the shape stroke weight of a specified shape frame.

    Returns

    Parameters

    • id: string

      the id of the shapeFrame that needs to get updated.

    • strokeWeight: number

      the new shape stroke weight that you want to set to the shapeFrame.

    Returns Promise<EditorResponse<null>>

Generated using TypeDoc