参数 | 类型 | 描述 | 定义者 |
---|---|---|---|
animating_draw | Boolean | 是否在动画中调用此组件的绘图函数。为True时,会在每一帧时调用此组件绘图函数。(默认为true) 此组件的this.variable.animation是一个对象变量。此对象中有3个属性: animating:是否处于动画中 time : 起始时间 duration:结束时间 | Custom |
drawFn | Function | 指定绘图的函数。(默认为空函数) | Custom |
eventValid | Function | 指定触发此组件事件的函数。(默认为undefined) | Custom |
fontunit | String | 此组件中文字的尺寸的单位。(默认为'px') | Component |
listeners | Object | 事件的配置项。(默认为null) | Painter |
z_index | Number | 组件渲染的顺序,值越大,越靠后渲染,意味着显示在最上层。(默认为 0) | Painter |
名称 | 描述 | 定义者 |
---|---|---|
beforedraw | 绘图之前触发,返回false停止绘图行为。
参数
| Painter |
click | 点击时触发。
参数
| Painter |
draw | 完成绘图之后触发。
参数
| Painter |
initialize | 初始化完成之后触发。
参数
| Element |
mousemove | 鼠标移动时触发。
参数
| Painter |
mouseout | 鼠标在离开时触发。
参数
| Painter |
mouseover | 鼠标在进入时触发。
参数
| Painter |
名称 | 描述 | 定义者 |
---|---|---|
draw |
参数
返回值
void
| Painter |
getDimension | 获取当前组件的尺寸。返回对象包含以下属性:
* @property x:左上方x轴坐标 * @property y:左上方y轴坐标 * @property width:宽度,单位:px。 * @property height:高度,单位:px。 参数
返回值
object
| Component |