jmgraph 3.1.92 → 3.1.94
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 +20 -29
- package/dist/jmgraph.min.js +1 -1
- package/package.json +1 -1
- package/src/core/jmEvents.js +5 -5
- package/src/core/jmGraph.js +11 -17
package/dist/jmgraph.js
CHANGED
|
@@ -1978,11 +1978,11 @@ var jmEvents = /*#__PURE__*/function () {
|
|
|
1978
1978
|
}
|
|
1979
1979
|
}
|
|
1980
1980
|
}, {
|
|
1981
|
-
key: "
|
|
1981
|
+
key: "destroy",
|
|
1982
1982
|
value: // 销毁
|
|
1983
|
-
function
|
|
1984
|
-
this.mouseHandler.
|
|
1985
|
-
this.keyHandler.
|
|
1983
|
+
function destroy() {
|
|
1984
|
+
this.mouseHandler.destroy();
|
|
1985
|
+
this.keyHandler.destroy();
|
|
1986
1986
|
}
|
|
1987
1987
|
}]);
|
|
1988
1988
|
|
|
@@ -2108,8 +2108,8 @@ var jmMouseEvent = /*#__PURE__*/function () {
|
|
|
2108
2108
|
} // 销毁所有事件
|
|
2109
2109
|
|
|
2110
2110
|
}, {
|
|
2111
|
-
key: "
|
|
2112
|
-
value: function
|
|
2111
|
+
key: "destroy",
|
|
2112
|
+
value: function destroy() {
|
|
2113
2113
|
for (var name in this.eventEvents) {
|
|
2114
2114
|
var event = this.eventEvents[name];
|
|
2115
2115
|
if (!event || !event.fun) continue;
|
|
@@ -2189,8 +2189,8 @@ var jmKeyEvent = /*#__PURE__*/function () {
|
|
|
2189
2189
|
} // 销毁所有事件
|
|
2190
2190
|
|
|
2191
2191
|
}, {
|
|
2192
|
-
key: "
|
|
2193
|
-
value: function
|
|
2192
|
+
key: "destroy",
|
|
2193
|
+
value: function destroy() {
|
|
2194
2194
|
for (var name in this.eventEvents) {
|
|
2195
2195
|
var event = this.eventEvents[name];
|
|
2196
2196
|
if (!event || !event.fun) continue;
|
|
@@ -2614,7 +2614,7 @@ var jmGraph = /*#__PURE__*/function (_jmControl) {
|
|
|
2614
2614
|
}
|
|
2615
2615
|
|
|
2616
2616
|
_this.canvas = canvas;
|
|
2617
|
-
|
|
2617
|
+
_this.context = canvas.getContext('2d');
|
|
2618
2618
|
|
|
2619
2619
|
_this.__init(callback);
|
|
2620
2620
|
|
|
@@ -2672,9 +2672,7 @@ var jmGraph = /*#__PURE__*/function (_jmControl) {
|
|
|
2672
2672
|
|
|
2673
2673
|
if (this.isWXMiniApp) {
|
|
2674
2674
|
scale = wx.getSystemInfoSync().pixelRatio || 1;
|
|
2675
|
-
}
|
|
2676
|
-
|
|
2677
|
-
if (scale > 1) {
|
|
2675
|
+
} else if (scale > 1) {
|
|
2678
2676
|
this.__normalSize = this.__normalSize || {
|
|
2679
2677
|
width: 0,
|
|
2680
2678
|
height: 0
|
|
@@ -2682,18 +2680,11 @@ var jmGraph = /*#__PURE__*/function (_jmControl) {
|
|
|
2682
2680
|
w = w || this.__normalSize.width || this.width, h = h || this.__normalSize.height || this.height;
|
|
2683
2681
|
if (w) this.__normalSize.width = w;
|
|
2684
2682
|
if (h) this.__normalSize.height = h;
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
this.canvas.width = w * scale;
|
|
2691
|
-
this.context.scale(scale, scale);
|
|
2692
|
-
} else {
|
|
2693
|
-
this.canvas.height = h;
|
|
2694
|
-
this.canvas.width = w;
|
|
2695
|
-
}
|
|
2696
|
-
|
|
2683
|
+
this.canvas.style && (this.canvas.style.width = w + "px");
|
|
2684
|
+
this.canvas.style && (this.canvas.style.height = h + "px");
|
|
2685
|
+
this.canvas.height = h * scale;
|
|
2686
|
+
this.canvas.width = w * scale;
|
|
2687
|
+
this.context.scale(scale, scale);
|
|
2697
2688
|
this.devicePixelRatio = scale;
|
|
2698
2689
|
}
|
|
2699
2690
|
}
|
|
@@ -3117,7 +3108,7 @@ var jmGraph = /*#__PURE__*/function (_jmControl) {
|
|
|
3117
3108
|
this.___isAutoRefreshing = true;
|
|
3118
3109
|
|
|
3119
3110
|
function update() {
|
|
3120
|
-
if (self.
|
|
3111
|
+
if (self.destroyed) {
|
|
3121
3112
|
self.___isAutoRefreshing = false;
|
|
3122
3113
|
return; // 已销毁
|
|
3123
3114
|
}
|
|
@@ -3134,10 +3125,10 @@ var jmGraph = /*#__PURE__*/function (_jmControl) {
|
|
|
3134
3125
|
} // 销毁当前对象
|
|
3135
3126
|
|
|
3136
3127
|
}, {
|
|
3137
|
-
key: "
|
|
3138
|
-
value: function
|
|
3139
|
-
this.eventHandler.
|
|
3140
|
-
this.
|
|
3128
|
+
key: "destroy",
|
|
3129
|
+
value: function destroy() {
|
|
3130
|
+
this.eventHandler.destroy();
|
|
3131
|
+
this.destroyed = true; // 标记已销毁
|
|
3141
3132
|
}
|
|
3142
3133
|
}], [{
|
|
3143
3134
|
key: "create",
|