Interface IToolStateModule

interface IToolStateModule {
    addTool: ((Tool) => void);
    getCurrentTool: (() => StateNode);
    getCurrentToolId: (() => string);
    getStateDescendant: (<T>(path) => T);
    getStatePath: (() => string);
    isInActiveTool: (() => boolean);
    removeTool: ((Tool) => void);
    rootState: StateNode;
    setCurrentTool: ((id?, info?) => App);
    stateInAny: ((...paths) => boolean);
    stateIsIn: ((path) => boolean);
    transformObject: ((options) => Promise<StateNode>);
    isInteracting(): boolean;
}

Implemented by

Properties

addTool: ((Tool) => void)

Type declaration

getCurrentTool: (() => StateNode)

Type declaration

getCurrentToolId: (() => string)

Type declaration

    • (): string
    • Returns string

getStateDescendant: (<T>(path) => T)

Type declaration

    • <T>(path): T
    • Type Parameters

      Parameters

      • path: string

      Returns T

getStatePath: (() => string)

Type declaration

    • (): string
    • Returns string

isInActiveTool: (() => boolean)

判断当前是否有工具处于运行中

Type declaration

    • (): boolean
    • 判断当前是否有工具处于运行中

      Returns boolean

removeTool: ((Tool) => void)

Type declaration

rootState: StateNode
setCurrentTool: ((id?, info?) => App)

Type declaration

    • (id?, info?): App
    • Parameters

      • Optional id: string
      • Optional info: Record<string, any>

      Returns App

stateInAny: ((...paths) => boolean)

Type declaration

    • (...paths): boolean
    • Parameters

      • Rest ...paths: string[]

      Returns boolean

stateIsIn: ((path) => boolean)

Type declaration

    • (path): boolean
    • Parameters

      • path: string

      Returns boolean

transformObject: ((options) => Promise<StateNode>)

对一个物体进行变换控制器操作

Type declaration

Methods

  • 是否正在交互

    Returns boolean