IControl

组件接口

new YS.IControl(ys)

UI功能组件接口
Name Type Default Description
ys YouScene null optional YouScene对象
See:

Members

readonlyauthor : String

组件作者

DOM : String

组件绑定的DOM,如#dom .class; 绑定DOM,可能会被添加两种class:disabled、active 激活组件时增加active类,组件在destroy时,会触发 $(this.DOM).removeClass('active'); 组件不可用时会增加disabled类
Default Value: undefined

enabled : Boolean

组件是否可用 不可用时会添加disabled类
See:
  • IControl.DOM

isDrag : Boolean

组件是否可以拖动
See:
  • IControl.DOM

readonlyname : String

组件名字

readonlyversion : String

组件版本号

Methods

abstractclean()

清理组件的临时数据、成果等

destroy()Undefined

销毁组件 重载时请务必调用IControl.prototype.destroy.apply(this);
Returns:

abstractdrag(dragId)

组件拖动
Name Type Description
dragId String 要拖动的组件id

isDestroyed()Boolean

该组件是否销毁 (true代表销毁了,false代表未销毁), 销毁后将不可以再使用
Returns:

abstractshow()

显示组件

Events

drawEndEvent

画图结束事件
Name Type Description
text String 画图显示的信息
control Object 当前画图工具