jmchart 1.1.98 → 1.2.0
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/jmchart.amd.js
CHANGED
|
@@ -3758,7 +3758,7 @@ define(['exports'], function (exports) { 'use strict';
|
|
|
3758
3758
|
try {
|
|
3759
3759
|
|
|
3760
3760
|
let img = this.getImage();
|
|
3761
|
-
if(this.graph.isWXMiniApp && this.graph.canvas) {
|
|
3761
|
+
if(this.graph.isWXMiniApp && this.graph.canvas && typeof img === 'string') {
|
|
3762
3762
|
// 图片对象
|
|
3763
3763
|
const image = this.graph.canvas.createImage();
|
|
3764
3764
|
// 图片加载完成回调
|
|
@@ -3780,6 +3780,10 @@ define(['exports'], function (exports) { 'use strict';
|
|
|
3780
3780
|
|
|
3781
3781
|
// 绘制
|
|
3782
3782
|
drawImg(img) {
|
|
3783
|
+
if(!img) {
|
|
3784
|
+
console.warn('image is empty');
|
|
3785
|
+
return;
|
|
3786
|
+
}
|
|
3783
3787
|
let bounds = this.parent && this.parent.absoluteBounds?this.parent.absoluteBounds:this.absoluteBounds;
|
|
3784
3788
|
if(!bounds) bounds = this.parent && this.parent.getAbsoluteBounds?this.parent.getAbsoluteBounds():this.getAbsoluteBounds();
|
|
3785
3789
|
let p = this.getLocation();
|
|
@@ -8437,7 +8441,7 @@ define(['exports'], function (exports) { 'use strict';
|
|
|
8437
8441
|
else lineTouching = 1;
|
|
8438
8442
|
}
|
|
8439
8443
|
|
|
8440
|
-
args.event.stopPropagation(); // 如果指定了锁定图表标线操作值,则触发后当次滑动不再响应系统默认行为
|
|
8444
|
+
args.event.stopPropagation && args.event.stopPropagation(); // 如果指定了锁定图表标线操作值,则触发后当次滑动不再响应系统默认行为
|
|
8441
8445
|
|
|
8442
8446
|
if (chart.style.markLine.lock) {
|
|
8443
8447
|
// 标线状态一直禁用系统能力
|
|
@@ -8492,9 +8496,9 @@ define(['exports'], function (exports) { 'use strict';
|
|
|
8492
8496
|
|
|
8493
8497
|
if (moved) {
|
|
8494
8498
|
if (args.longtap === 2 && args.event) {
|
|
8495
|
-
args.event.preventDefault(); // 阻止默认行为
|
|
8499
|
+
args.event.preventDefault && args.event.preventDefault(); // 阻止默认行为
|
|
8496
8500
|
|
|
8497
|
-
args.event.stopPropagation();
|
|
8501
|
+
args.event.stopPropagation && args.event.stopPropagation();
|
|
8498
8502
|
}
|
|
8499
8503
|
|
|
8500
8504
|
if (!args.cancel) this.chart.emit('marklinemove', args);
|
package/dist/jmchart.cjs.js
CHANGED
|
@@ -3760,7 +3760,7 @@ class jmImage extends jmControl {
|
|
|
3760
3760
|
try {
|
|
3761
3761
|
|
|
3762
3762
|
let img = this.getImage();
|
|
3763
|
-
if(this.graph.isWXMiniApp && this.graph.canvas) {
|
|
3763
|
+
if(this.graph.isWXMiniApp && this.graph.canvas && typeof img === 'string') {
|
|
3764
3764
|
// 图片对象
|
|
3765
3765
|
const image = this.graph.canvas.createImage();
|
|
3766
3766
|
// 图片加载完成回调
|
|
@@ -3782,6 +3782,10 @@ class jmImage extends jmControl {
|
|
|
3782
3782
|
|
|
3783
3783
|
// 绘制
|
|
3784
3784
|
drawImg(img) {
|
|
3785
|
+
if(!img) {
|
|
3786
|
+
console.warn('image is empty');
|
|
3787
|
+
return;
|
|
3788
|
+
}
|
|
3785
3789
|
let bounds = this.parent && this.parent.absoluteBounds?this.parent.absoluteBounds:this.absoluteBounds;
|
|
3786
3790
|
if(!bounds) bounds = this.parent && this.parent.getAbsoluteBounds?this.parent.getAbsoluteBounds():this.getAbsoluteBounds();
|
|
3787
3791
|
let p = this.getLocation();
|
|
@@ -8439,7 +8443,7 @@ class jmMarkLineManager {
|
|
|
8439
8443
|
else lineTouching = 1;
|
|
8440
8444
|
}
|
|
8441
8445
|
|
|
8442
|
-
args.event.stopPropagation(); // 如果指定了锁定图表标线操作值,则触发后当次滑动不再响应系统默认行为
|
|
8446
|
+
args.event.stopPropagation && args.event.stopPropagation(); // 如果指定了锁定图表标线操作值,则触发后当次滑动不再响应系统默认行为
|
|
8443
8447
|
|
|
8444
8448
|
if (chart.style.markLine.lock) {
|
|
8445
8449
|
// 标线状态一直禁用系统能力
|
|
@@ -8494,9 +8498,9 @@ class jmMarkLineManager {
|
|
|
8494
8498
|
|
|
8495
8499
|
if (moved) {
|
|
8496
8500
|
if (args.longtap === 2 && args.event) {
|
|
8497
|
-
args.event.preventDefault(); // 阻止默认行为
|
|
8501
|
+
args.event.preventDefault && args.event.preventDefault(); // 阻止默认行为
|
|
8498
8502
|
|
|
8499
|
-
args.event.stopPropagation();
|
|
8503
|
+
args.event.stopPropagation && args.event.stopPropagation();
|
|
8500
8504
|
}
|
|
8501
8505
|
|
|
8502
8506
|
if (!args.cancel) this.chart.emit('marklinemove', args);
|
package/dist/jmchart.esm.js
CHANGED
|
@@ -3756,7 +3756,7 @@ class jmImage extends jmControl {
|
|
|
3756
3756
|
try {
|
|
3757
3757
|
|
|
3758
3758
|
let img = this.getImage();
|
|
3759
|
-
if(this.graph.isWXMiniApp && this.graph.canvas) {
|
|
3759
|
+
if(this.graph.isWXMiniApp && this.graph.canvas && typeof img === 'string') {
|
|
3760
3760
|
// 图片对象
|
|
3761
3761
|
const image = this.graph.canvas.createImage();
|
|
3762
3762
|
// 图片加载完成回调
|
|
@@ -3778,6 +3778,10 @@ class jmImage extends jmControl {
|
|
|
3778
3778
|
|
|
3779
3779
|
// 绘制
|
|
3780
3780
|
drawImg(img) {
|
|
3781
|
+
if(!img) {
|
|
3782
|
+
console.warn('image is empty');
|
|
3783
|
+
return;
|
|
3784
|
+
}
|
|
3781
3785
|
let bounds = this.parent && this.parent.absoluteBounds?this.parent.absoluteBounds:this.absoluteBounds;
|
|
3782
3786
|
if(!bounds) bounds = this.parent && this.parent.getAbsoluteBounds?this.parent.getAbsoluteBounds():this.getAbsoluteBounds();
|
|
3783
3787
|
let p = this.getLocation();
|
|
@@ -8435,7 +8439,7 @@ class jmMarkLineManager {
|
|
|
8435
8439
|
else lineTouching = 1;
|
|
8436
8440
|
}
|
|
8437
8441
|
|
|
8438
|
-
args.event.stopPropagation(); // 如果指定了锁定图表标线操作值,则触发后当次滑动不再响应系统默认行为
|
|
8442
|
+
args.event.stopPropagation && args.event.stopPropagation(); // 如果指定了锁定图表标线操作值,则触发后当次滑动不再响应系统默认行为
|
|
8439
8443
|
|
|
8440
8444
|
if (chart.style.markLine.lock) {
|
|
8441
8445
|
// 标线状态一直禁用系统能力
|
|
@@ -8490,9 +8494,9 @@ class jmMarkLineManager {
|
|
|
8490
8494
|
|
|
8491
8495
|
if (moved) {
|
|
8492
8496
|
if (args.longtap === 2 && args.event) {
|
|
8493
|
-
args.event.preventDefault(); // 阻止默认行为
|
|
8497
|
+
args.event.preventDefault && args.event.preventDefault(); // 阻止默认行为
|
|
8494
8498
|
|
|
8495
|
-
args.event.stopPropagation();
|
|
8499
|
+
args.event.stopPropagation && args.event.stopPropagation();
|
|
8496
8500
|
}
|
|
8497
8501
|
|
|
8498
8502
|
if (!args.cancel) this.chart.emit('marklinemove', args);
|
package/dist/jmchart.iife.js
CHANGED
|
@@ -3759,7 +3759,7 @@
|
|
|
3759
3759
|
try {
|
|
3760
3760
|
|
|
3761
3761
|
let img = this.getImage();
|
|
3762
|
-
if(this.graph.isWXMiniApp && this.graph.canvas) {
|
|
3762
|
+
if(this.graph.isWXMiniApp && this.graph.canvas && typeof img === 'string') {
|
|
3763
3763
|
// 图片对象
|
|
3764
3764
|
const image = this.graph.canvas.createImage();
|
|
3765
3765
|
// 图片加载完成回调
|
|
@@ -3781,6 +3781,10 @@
|
|
|
3781
3781
|
|
|
3782
3782
|
// 绘制
|
|
3783
3783
|
drawImg(img) {
|
|
3784
|
+
if(!img) {
|
|
3785
|
+
console.warn('image is empty');
|
|
3786
|
+
return;
|
|
3787
|
+
}
|
|
3784
3788
|
let bounds = this.parent && this.parent.absoluteBounds?this.parent.absoluteBounds:this.absoluteBounds;
|
|
3785
3789
|
if(!bounds) bounds = this.parent && this.parent.getAbsoluteBounds?this.parent.getAbsoluteBounds():this.getAbsoluteBounds();
|
|
3786
3790
|
let p = this.getLocation();
|
|
@@ -8438,7 +8442,7 @@
|
|
|
8438
8442
|
else lineTouching = 1;
|
|
8439
8443
|
}
|
|
8440
8444
|
|
|
8441
|
-
args.event.stopPropagation(); // 如果指定了锁定图表标线操作值,则触发后当次滑动不再响应系统默认行为
|
|
8445
|
+
args.event.stopPropagation && args.event.stopPropagation(); // 如果指定了锁定图表标线操作值,则触发后当次滑动不再响应系统默认行为
|
|
8442
8446
|
|
|
8443
8447
|
if (chart.style.markLine.lock) {
|
|
8444
8448
|
// 标线状态一直禁用系统能力
|
|
@@ -8493,9 +8497,9 @@
|
|
|
8493
8497
|
|
|
8494
8498
|
if (moved) {
|
|
8495
8499
|
if (args.longtap === 2 && args.event) {
|
|
8496
|
-
args.event.preventDefault(); // 阻止默认行为
|
|
8500
|
+
args.event.preventDefault && args.event.preventDefault(); // 阻止默认行为
|
|
8497
8501
|
|
|
8498
|
-
args.event.stopPropagation();
|
|
8502
|
+
args.event.stopPropagation && args.event.stopPropagation();
|
|
8499
8503
|
}
|
|
8500
8504
|
|
|
8501
8505
|
if (!args.cancel) this.chart.emit('marklinemove', args);
|
package/dist/jmchart.system.js
CHANGED
|
@@ -3761,7 +3761,7 @@ System.register([], function (exports) {
|
|
|
3761
3761
|
try {
|
|
3762
3762
|
|
|
3763
3763
|
let img = this.getImage();
|
|
3764
|
-
if(this.graph.isWXMiniApp && this.graph.canvas) {
|
|
3764
|
+
if(this.graph.isWXMiniApp && this.graph.canvas && typeof img === 'string') {
|
|
3765
3765
|
// 图片对象
|
|
3766
3766
|
const image = this.graph.canvas.createImage();
|
|
3767
3767
|
// 图片加载完成回调
|
|
@@ -3783,6 +3783,10 @@ System.register([], function (exports) {
|
|
|
3783
3783
|
|
|
3784
3784
|
// 绘制
|
|
3785
3785
|
drawImg(img) {
|
|
3786
|
+
if(!img) {
|
|
3787
|
+
console.warn('image is empty');
|
|
3788
|
+
return;
|
|
3789
|
+
}
|
|
3786
3790
|
let bounds = this.parent && this.parent.absoluteBounds?this.parent.absoluteBounds:this.absoluteBounds;
|
|
3787
3791
|
if(!bounds) bounds = this.parent && this.parent.getAbsoluteBounds?this.parent.getAbsoluteBounds():this.getAbsoluteBounds();
|
|
3788
3792
|
let p = this.getLocation();
|
|
@@ -8440,7 +8444,7 @@ System.register([], function (exports) {
|
|
|
8440
8444
|
else lineTouching = 1;
|
|
8441
8445
|
}
|
|
8442
8446
|
|
|
8443
|
-
args.event.stopPropagation(); // 如果指定了锁定图表标线操作值,则触发后当次滑动不再响应系统默认行为
|
|
8447
|
+
args.event.stopPropagation && args.event.stopPropagation(); // 如果指定了锁定图表标线操作值,则触发后当次滑动不再响应系统默认行为
|
|
8444
8448
|
|
|
8445
8449
|
if (chart.style.markLine.lock) {
|
|
8446
8450
|
// 标线状态一直禁用系统能力
|
|
@@ -8495,9 +8499,9 @@ System.register([], function (exports) {
|
|
|
8495
8499
|
|
|
8496
8500
|
if (moved) {
|
|
8497
8501
|
if (args.longtap === 2 && args.event) {
|
|
8498
|
-
args.event.preventDefault(); // 阻止默认行为
|
|
8502
|
+
args.event.preventDefault && args.event.preventDefault(); // 阻止默认行为
|
|
8499
8503
|
|
|
8500
|
-
args.event.stopPropagation();
|
|
8504
|
+
args.event.stopPropagation && args.event.stopPropagation();
|
|
8501
8505
|
}
|
|
8502
8506
|
|
|
8503
8507
|
if (!args.cancel) this.chart.emit('marklinemove', args);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jmchart",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "chart",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"directories": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://github.com/jiamao/jmchart#readme",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"jmgraph": "^3.1.
|
|
31
|
+
"jmgraph": "^3.1.95"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@babel/core": "^7.10.2",
|
|
@@ -107,7 +107,7 @@ export default class jmMarkLineManager {
|
|
|
107
107
|
else lineTouching = 1;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
args.event.stopPropagation();
|
|
110
|
+
args.event.stopPropagation && args.event.stopPropagation();
|
|
111
111
|
// 如果指定了锁定图表标线操作值,则触发后当次滑动不再响应系统默认行为
|
|
112
112
|
if(chart.style.markLine.lock){
|
|
113
113
|
// 标线状态一直禁用系统能力
|
|
@@ -163,8 +163,8 @@ export default class jmMarkLineManager {
|
|
|
163
163
|
}
|
|
164
164
|
if(moved) {
|
|
165
165
|
if(args.longtap === 2 && args.event) {
|
|
166
|
-
args.event.preventDefault();// 阻止默认行为
|
|
167
|
-
args.event.stopPropagation();
|
|
166
|
+
args.event.preventDefault && args.event.preventDefault();// 阻止默认行为
|
|
167
|
+
args.event.stopPropagation && args.event.stopPropagation();
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
if(!args.cancel) this.chart.emit('marklinemove', args);
|