jmgraph 3.2.2 → 3.2.3
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.
- package/README.md +4 -4
- package/dist/jmgraph.core.min.js +1 -1
- package/dist/jmgraph.core.min.js.map +1 -1
- package/dist/jmgraph.js +3064 -351
- package/dist/jmgraph.min.js +1 -1
- package/index.js +4 -0
- package/package.json +4 -4
- package/src/core/jmControl.js +97 -57
- package/src/core/jmGradient.js +29 -14
- package/src/core/jmGraph.js +70 -26
- package/src/core/jmObject.js +2 -3
- package/src/core/jmPath.js +19 -3
- package/src/core/jmProperty.js +29 -14
- package/src/core/jmUtils.js +218 -31
- package/src/lib/earcut.js +680 -0
- package/src/lib/earcut.md +73 -0
- package/src/lib/webgl/base.js +201 -0
- package/src/lib/webgl/core/buffer.js +48 -0
- package/src/lib/webgl/core/mapSize.js +40 -0
- package/src/lib/webgl/core/mapType.js +43 -0
- package/src/lib/webgl/core/program.js +139 -0
- package/src/lib/webgl/core/shader.js +14 -0
- package/src/lib/webgl/core/texture.js +61 -0
- package/src/lib/webgl/gradient.js +196 -0
- package/src/lib/webgl/index.js +11 -0
- package/src/lib/webgl/path.js +679 -0
- package/src/shapes/jmArc.js +15 -11
- package/src/shapes/jmArrow.js +10 -10
- package/src/shapes/jmBezier.js +2 -2
- package/src/shapes/jmCircle.js +8 -1
- package/src/shapes/jmHArc.js +17 -15
- package/src/shapes/jmImage.js +68 -38
- package/src/shapes/jmLabel.js +11 -10
- package/src/shapes/jmLine.js +20 -12
- package/src/shapes/jmPrismatic.js +4 -2
- package/src/shapes/jmRect.js +5 -4
- package/src/shapes/jmResize.js +6 -4
package/src/shapes/jmRect.js
CHANGED
|
@@ -13,6 +13,7 @@ export default class jmRect extends jmPath {
|
|
|
13
13
|
|
|
14
14
|
constructor(params, t='jmRect') {
|
|
15
15
|
params = params||{};
|
|
16
|
+
params.isRegular = true;// 规则的
|
|
16
17
|
super(params, t);
|
|
17
18
|
|
|
18
19
|
this.style.close = true;
|
|
@@ -24,11 +25,11 @@ export default class jmRect extends jmPath {
|
|
|
24
25
|
* @type {number}
|
|
25
26
|
*/
|
|
26
27
|
get radius() {
|
|
27
|
-
return this.
|
|
28
|
+
return this.property('radius');
|
|
28
29
|
}
|
|
29
30
|
set radius(v) {
|
|
30
31
|
this.needUpdate = true;
|
|
31
|
-
return this.
|
|
32
|
+
return this.property('radius', v);
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
/**
|
|
@@ -37,11 +38,11 @@ export default class jmRect extends jmPath {
|
|
|
37
38
|
* @type {point}
|
|
38
39
|
*/
|
|
39
40
|
get position() {
|
|
40
|
-
return this.
|
|
41
|
+
return this.property('position');
|
|
41
42
|
}
|
|
42
43
|
set position(v) {
|
|
43
44
|
this.needUpdate = true;
|
|
44
|
-
return this.
|
|
45
|
+
return this.property('position', v);
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
/**
|
package/src/shapes/jmResize.js
CHANGED
|
@@ -11,6 +11,8 @@ export default class jmResize extends jmRect {
|
|
|
11
11
|
|
|
12
12
|
constructor(params, t='jmResize') {
|
|
13
13
|
params = params || {};
|
|
14
|
+
params.isRegular = true;// 规则的
|
|
15
|
+
|
|
14
16
|
super(params, t);
|
|
15
17
|
//是否可拉伸
|
|
16
18
|
this.resizable = params.resizable === false?false:true;
|
|
@@ -26,10 +28,10 @@ export default class jmResize extends jmRect {
|
|
|
26
28
|
* @type {number}
|
|
27
29
|
*/
|
|
28
30
|
get rectSize() {
|
|
29
|
-
return this.
|
|
31
|
+
return this.property('rectSize');
|
|
30
32
|
}
|
|
31
33
|
set rectSize(v) {
|
|
32
|
-
return this.
|
|
34
|
+
return this.property('rectSize', v);
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
/**
|
|
@@ -38,10 +40,10 @@ export default class jmResize extends jmRect {
|
|
|
38
40
|
* @type {boolean}
|
|
39
41
|
*/
|
|
40
42
|
get resizable() {
|
|
41
|
-
return this.
|
|
43
|
+
return this.property('resizable');
|
|
42
44
|
}
|
|
43
45
|
set resizable(v) {
|
|
44
|
-
return this.
|
|
46
|
+
return this.property('resizable', v);
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
/**
|