Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SGraphPropertyCommand<T>

属性修改命令类

author

张宇(taohuzy@163.com)

Type parameters

  • T

Hierarchy

Index

Constructors

constructor

  • 构造函数

    Parameters

    • scene: SGraphScene

      命令所属的场景类

    • item: SGraphItem

      命令所属的item类

    • propName: string

      修改的属性名称

    • oldProp: T

      修改前的属性值

    • newProp: T

      修改后的属性值

    Returns SGraphPropertyCommand

Properties

Readonly command

command: string

命令名称

desc

desc: string

item

指向item对象

newProp

newProp: T

属性新值

oldProp

oldProp: T

属性旧值

propName

propName: string

属性名称

scene

scene: SGraphScene | null = null

命令所属的场景类

Methods

id

  • id(): number
  • Returns number

mergeWith

  • mergeWith(command: SUndoCommand): boolean
  • Parameters

    • command: SUndoCommand

    Returns boolean

redo

  • redo(): void
  • redo操作

    Returns void

toString

  • toString(): string
  • 命令细节描述

    Returns string

undo

  • undo(): void
  • undo操作

    Returns void