Class: ComponentContext

ComponentContext

Members

(non-null) design :up.design.Design

Type:
  • up.design.Design

inTransaction_ :boolean

@private
Type:
  • boolean

isValid_ :boolean

@private
Type:
  • boolean

recentActionId :string

Type:
  • string

workspace :up.workspace.Workspace|up.workspace.ComponentEditor

Type:
  • up.workspace.Workspace | up.workspace.ComponentEditor

Methods

(static) create(workspacenon-null) → (non-null) {up.api.ComponentContext}

Returns a new api context. Not a full-fledged ApiGlobal.
Parameters:
Name Type Description
workspace up.workspace.Workspace
Returns:
A new API context.
Type
up.api.ComponentContext

handleAction(actionnon-null)

Parameters:
Name Type Description
action up.action.generated.SketchAction

withTransaction(initiator, func)

Execute the given function inside the context of a transaction.
Parameters:
Name Type Description
initiator string
func function