Options
All
  • Public
  • Public/Protected
  • All
Menu

撤回行为类

description

该类为核心自动注册的行为类,但可重写该类并进行覆盖

Hierarchy

Index

Constructors

constructor

Properties

behaviorName

behaviorName: string = ...

行为名称,默认为空字符串

isActionStackItem

isActionStackItem: boolean = false

是否为操作栈的对象,默认为 false,作用在 joinBaseData 的 api 中读取该字段来判断是否插入 actionStack 中。 在 Shape 类中会覆盖为 true。 在 Behavior 中会覆盖为 false。

Readonly undoIds

undoIds: string[]

被撤回的标识 id

whiteBoard

whiteBoard: WhiteBoard

白板实例

Static behaviorName

behaviorName: string = ...

Accessors

board

  • get board(): undefined | Board
  • 当前图形所在的画板

    Returns undefined | Board

boardId

  • get boardId(): string
  • 所在的画板 id

    Returns string

clientId

  • get clientId(): string
  • 客户端 id

    Returns string

id

  • get id(): string
  • 标识 id

    Returns string

isSelf

  • get isSelf(): boolean
  • 是否为实例化白板的用户对象

    description

    当前对象和所在的白板实例其中一个的 userInfo.userId 为空字符串或 undefined 时返回 false

    Returns boolean

isSelfByOperationModel

  • get isSelfByOperationModel(): boolean
  • 根据操作模式返回是否为当前用户创建的对象

    description

    NORMAL 下,永远返回 true

    description

    SELF 下,根据 isSelf 的条件进行判断

    description

    其他情况下返回 true

    Returns boolean

userInfo

  • 用户信息

    Returns undefined | UserInfo

Methods

clear

  • clear(): void
  • 当前对象被清空的 hook

    Returns void

getBaseData

implement

  • implement(): void

redo

  • redo(): void
  • 当前对象被重做的 hook

    Returns void

undo

  • undo(): void
  • 当前对象被撤回的 hook

    Returns void