ice-render 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,22 +5,26 @@ import ICERect from '../../graphic/shape/ICERect';
5
5
  * - 调整尺寸的操作手柄不能独立存在,只能依附在某个宿主对象上。
6
6
  * - 此手柄只能调整尺寸,不能实现翻转
7
7
  *
8
- * TODO: 补全 props 配置项
9
- * {
10
- * direction: 改变的方向,共有3个可选的值: x/y/both
11
- * position: 手柄在变换矩形4个边上的位置,共有8个:lt/t/rt/r/rb/b/lb/l
12
- * }
13
8
  */
14
9
  export default class ResizeControl extends ICERect {
10
+ /**
11
+ * props:
12
+ * {
13
+ * direction: 改变的方向,共有3个可选的值: x/y/both
14
+ * position: 手柄在变换矩形4个边上的位置,共有8个:lt/t/rt/r/rb/b/lb/l
15
+ * quadrant: 当前所在的象限
16
+ * }
17
+ * @param props
18
+ */
15
19
  constructor(props: any);
16
20
  protected initEvents(): void;
17
21
  /**
18
- * 围绕几何中心点调整宽高。
19
22
  * @param evt
20
23
  */
21
24
  private resizeEvtHandler;
22
25
  /**
23
26
  * @overwrite
27
+ * @method moveGlobalPosition
24
28
  * ResizeControl 不能自由移动自己的位置,自能在X轴、Y轴,以及矩形的2条对角线上移动位置。
25
29
  *
26
30
  * 在全局空间(canvas)中移动指定的位移。
@@ -4,10 +4,6 @@ import ICECircle from '../../graphic/shape/ICECircle';
4
4
  *
5
5
  * - 旋转手柄不能独立存在,只能依附在某个宿主对象上。
6
6
  * - 此手柄仅用来修改组件的旋转角度。
7
- *
8
- * TODO: 补全 props 配置项
9
- * {
10
- * }
11
7
  */
12
8
  export default class RotateControl extends ICECircle {
13
9
  constructor(props: any);
@@ -56,13 +56,6 @@ declare abstract class ICEEventTarget {
56
56
  * @returns
57
57
  */
58
58
  off(eventName: string, fn: Function, scope?: any): void;
59
- /**
60
- * @method once
61
- * 一次性事件,触发一次就自动删除自己。
62
- * @param eventName
63
- * @param fn
64
- */
65
- once(eventName: string, fn: Function, scope?: any): void;
66
59
  /**
67
60
  * @method dispatchEvent
68
61
  *
@@ -76,6 +69,13 @@ declare abstract class ICEEventTarget {
76
69
  * @returns
77
70
  */
78
71
  trigger(eventName: string, originalEvent?: any, param?: {}): boolean;
72
+ /**
73
+ * @method once
74
+ * 一次性事件,触发一次就自动删除自己。
75
+ * @param eventName
76
+ * @param fn
77
+ */
78
+ once(eventName: string, fn: Function, scope?: any): void;
79
79
  /**
80
80
  * @method suspend
81
81
  * 挂起事件。
@@ -7,11 +7,8 @@
7
7
  */
8
8
  import ICEComponent from './ICEComponent';
9
9
  /**
10
- * @class ICEPath
11
- *
12
- * 路径
13
- *
14
10
  * @abstract
11
+ * @class ICEPath 路径
15
12
  * @author 大漠穷秋<damoqiongqiu@126.com>
16
13
  */
17
14
  declare abstract class ICEPath extends ICEComponent {
@@ -1,11 +1,10 @@
1
1
  import ICEComponent from '../ICEComponent';
2
2
  import ICERect from '../shape/ICERect';
3
3
  /**
4
- * @class ICEGroup
4
+ * @class ICEGroup 容器型组件
5
5
  *
6
- * 容器型组件
7
- *
8
- * ICEGroup 可以包含自身,利用此组件可以构造出树形的对象结构。
6
+ * - ICEGroup 可以带有子组件,所有容器型的组件都应该继承 ICEGroup
7
+ * - ICEGroup 可以包含自身,利用此组件可以构造出树形的组件结构。
9
8
  *
10
9
  * @author 大漠穷秋<damoqiongqiu@126.com>
11
10
  */
@@ -7,9 +7,9 @@
7
7
  */
8
8
  import ICEEllipse from './ICEEllipse';
9
9
  /**
10
- * @class ICECircle
10
+ * @class ICECircle 正圆形
11
11
  *
12
- * 正圆形,采用椭圆绘制方法,正圆形作为椭圆的特殊情况。
12
+ * 采用椭圆绘制方法,正圆形作为椭圆的特殊情况。
13
13
  *
14
14
  * @author 大漠穷秋<damoqiongqiu@126.com>
15
15
  */
@@ -1,9 +1,6 @@
1
1
  import ICEPath from '../ICEPath';
2
2
  /**
3
- * @class ICEEllipse
4
- *
5
- * 椭圆形。
6
- *
3
+ * @class ICEEllipse 椭圆形
7
4
  * @author 大漠穷秋<damoqiongqiu@126.com>
8
5
  */
9
6
  declare class ICEEllipse extends ICEPath {
@@ -1,9 +1,7 @@
1
1
  import ICEDotPath from '../ICEDotPath';
2
2
  /**
3
3
  *
4
- * @class ICEIsogon
5
- *
6
- * 正N边形
4
+ * @class ICEIsogon 正N边形
7
5
  *
8
6
  * @author 大漠穷秋<damoqiongqiu@126.com>
9
7
  */
@@ -1,9 +1,6 @@
1
1
  import ICEDotPath from '../ICEDotPath';
2
2
  /**
3
- * @class ICEStar
4
- *
5
- * 正 N 角星
6
- *
3
+ * @class ICEStar 正N角星
7
4
  * @author 大漠穷秋<damoqiongqiu@126.com>
8
5
  */
9
6
  declare class ICEStar extends ICEDotPath {
@@ -1,6 +1,7 @@
1
1
  import ICEComponent from '../ICEComponent';
2
2
  /**
3
3
  * TODO:draw text along Path2D
4
+ * @class ICEText 文本
4
5
  * @author 大漠穷秋<damoqiongqiu@126.com>
5
6
  */
6
7
  declare class ICEText extends ICEComponent {
@@ -1,9 +1,7 @@
1
1
  import ICEEventTarget from '../event/ICEEventTarget';
2
2
  import ICE from '../ICE';
3
3
  /**
4
- * @class CanvasRenderer
5
- *
6
- * Canvas 渲染器
4
+ * @class CanvasRenderer Canvas 渲染器
7
5
  *
8
6
  * - 一个 ICE 实例上,只能有一个渲染器实例。
9
7
  *
@@ -1,7 +1,9 @@
1
1
  import ICE from '../ICE';
2
2
  /**
3
- * @class ImageCache
4
- * 图片缓存类
3
+ * @class ImageCache 图片缓存器
4
+ *
5
+ * 以图片的 url 作为 key,图片对象作为 value,缓存图片。
6
+ *
5
7
  * @author 大漠穷秋<damoqiongqiu@126.com>
6
8
  */
7
9
  export default class ImageCache {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "author": "大漠穷秋",
3
3
  "name": "ice-render",
4
- "version": "1.0.3",
4
+ "version": "1.0.4",
5
5
  "description": "A canvas engine for interactive graphics.",
6
6
  "repository": "https://gitee.com/ice-render/ice-render",
7
7
  "module": "dist/index.js",