jmgraph 3.2.3 → 3.2.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.
- package/dist/jmgraph.core.min.js +1 -1
- package/dist/jmgraph.core.min.js.map +1 -1
- package/dist/jmgraph.js +42 -2372
- package/dist/jmgraph.min.js +1 -1
- package/package.json +1 -1
- package/src/core/jmControl.js +15 -15
- package/src/core/jmGraph.js +1 -1
package/package.json
CHANGED
package/src/core/jmControl.js
CHANGED
|
@@ -4,7 +4,7 @@ import {jmList} from "./jmList.js";
|
|
|
4
4
|
import {jmGradient} from "./jmGradient.js";
|
|
5
5
|
import {jmShadow} from "./jmShadow.js";
|
|
6
6
|
import {jmProperty} from "./jmProperty.js";
|
|
7
|
-
import WebglPath from "../lib/webgl/path.js";
|
|
7
|
+
//import WebglPath from "../lib/webgl/path.js";
|
|
8
8
|
|
|
9
9
|
//样式名称,也当做白名单使用
|
|
10
10
|
const jmStyleMap = {
|
|
@@ -58,13 +58,13 @@ export default class jmControl extends jmProperty {
|
|
|
58
58
|
this.interactive = typeof params.interactive == 'undefined'? true : params.interactive;
|
|
59
59
|
|
|
60
60
|
// webgl模式
|
|
61
|
-
if(this.mode === 'webgl') {
|
|
61
|
+
/*if(this.mode === 'webgl') {
|
|
62
62
|
this.webglControl = new WebglPath(this.graph, {
|
|
63
63
|
style: this.style,
|
|
64
64
|
isRegular: params.isRegular,
|
|
65
65
|
needCut: params.needCut
|
|
66
66
|
});
|
|
67
|
-
}
|
|
67
|
+
}*/
|
|
68
68
|
|
|
69
69
|
this.initializing();
|
|
70
70
|
|
|
@@ -803,7 +803,7 @@ export default class jmControl extends jmProperty {
|
|
|
803
803
|
beginDraw() {
|
|
804
804
|
this.getLocation(true);//重置位置信息
|
|
805
805
|
this.context.beginPath && this.context.beginPath();
|
|
806
|
-
if(this.webglControl && this.webglControl.beginDraw) this.webglControl.beginDraw();
|
|
806
|
+
//if(this.webglControl && this.webglControl.beginDraw) this.webglControl.beginDraw();
|
|
807
807
|
}
|
|
808
808
|
|
|
809
809
|
/**
|
|
@@ -814,23 +814,23 @@ export default class jmControl extends jmProperty {
|
|
|
814
814
|
endDraw() {
|
|
815
815
|
//如果当前为封闭路径
|
|
816
816
|
if(this.style.close) {
|
|
817
|
-
if(this.webglControl) this.webglControl.closePath();
|
|
818
|
-
|
|
817
|
+
//if(this.webglControl) this.webglControl.closePath();
|
|
818
|
+
this.context.closePath && this.context.closePath();
|
|
819
819
|
}
|
|
820
820
|
|
|
821
821
|
if(this.style['fill']) {
|
|
822
|
-
if(this.webglControl) {
|
|
822
|
+
/*if(this.webglControl) {
|
|
823
823
|
const bounds = this.getBounds();
|
|
824
824
|
this.webglControl.fill(bounds);
|
|
825
|
-
}
|
|
826
|
-
|
|
825
|
+
}*/
|
|
826
|
+
this.context.fill && this.context.fill();
|
|
827
827
|
}
|
|
828
828
|
if(this.style['stroke'] || (!this.style['fill'] && !this.is('jmGraph'))) {
|
|
829
|
-
if(this.webglControl) this.webglControl.stroke();
|
|
830
|
-
|
|
829
|
+
//if(this.webglControl) this.webglControl.stroke();
|
|
830
|
+
this.context.stroke && this.context.stroke();
|
|
831
831
|
}
|
|
832
832
|
|
|
833
|
-
if(this.webglControl && this.webglControl.endDraw) this.webglControl.endDraw();
|
|
833
|
+
//if(this.webglControl && this.webglControl.endDraw) this.webglControl.endDraw();
|
|
834
834
|
|
|
835
835
|
this.needUpdate = false;
|
|
836
836
|
}
|
|
@@ -845,13 +845,13 @@ export default class jmControl extends jmProperty {
|
|
|
845
845
|
if(this.points && this.points.length > 0) {
|
|
846
846
|
//获取当前控件的绝对位置
|
|
847
847
|
const bounds = this.parent && this.parent.absoluteBounds?this.parent.absoluteBounds:this.absoluteBounds;
|
|
848
|
-
if(this.webglControl) {
|
|
848
|
+
/*if(this.webglControl) {
|
|
849
849
|
this.webglControl.setParentBounds(bounds);
|
|
850
850
|
this.webglControl.draw([
|
|
851
851
|
...this.points
|
|
852
852
|
]);
|
|
853
|
-
}
|
|
854
|
-
|
|
853
|
+
}*/
|
|
854
|
+
if(this.context && this.context.moveTo) {
|
|
855
855
|
this.context.moveTo(this.points[0].x + bounds.left,this.points[0].y + bounds.top);
|
|
856
856
|
let len = this.points.length;
|
|
857
857
|
for(let i=1; i < len;i++) {
|
package/src/core/jmGraph.js
CHANGED