jmchart 1.1.91 → 1.1.92

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.
@@ -8022,8 +8022,11 @@ define(['exports'], function (exports) { 'use strict';
8022
8022
  }
8023
8023
 
8024
8024
  if (moved) {
8025
- args.event.stopPropagation();
8026
- args.event.preventDefault(); // 阻止默认行为
8025
+ if (args.longtap === 2 && args.event) {
8026
+ args.event.preventDefault(); // 阻止默认行为
8027
+
8028
+ args.event.stopPropagation();
8029
+ }
8027
8030
 
8028
8031
  if (!args.cancel) this.chart.emit('marklinemove', args);
8029
8032
  }
@@ -8024,8 +8024,11 @@ class jmMarkLineManager {
8024
8024
  }
8025
8025
 
8026
8026
  if (moved) {
8027
- args.event.stopPropagation();
8028
- args.event.preventDefault(); // 阻止默认行为
8027
+ if (args.longtap === 2 && args.event) {
8028
+ args.event.preventDefault(); // 阻止默认行为
8029
+
8030
+ args.event.stopPropagation();
8031
+ }
8029
8032
 
8030
8033
  if (!args.cancel) this.chart.emit('marklinemove', args);
8031
8034
  }
@@ -8020,8 +8020,11 @@ class jmMarkLineManager {
8020
8020
  }
8021
8021
 
8022
8022
  if (moved) {
8023
- args.event.stopPropagation();
8024
- args.event.preventDefault(); // 阻止默认行为
8023
+ if (args.longtap === 2 && args.event) {
8024
+ args.event.preventDefault(); // 阻止默认行为
8025
+
8026
+ args.event.stopPropagation();
8027
+ }
8025
8028
 
8026
8029
  if (!args.cancel) this.chart.emit('marklinemove', args);
8027
8030
  }
@@ -8023,8 +8023,11 @@
8023
8023
  }
8024
8024
 
8025
8025
  if (moved) {
8026
- args.event.stopPropagation();
8027
- args.event.preventDefault(); // 阻止默认行为
8026
+ if (args.longtap === 2 && args.event) {
8027
+ args.event.preventDefault(); // 阻止默认行为
8028
+
8029
+ args.event.stopPropagation();
8030
+ }
8028
8031
 
8029
8032
  if (!args.cancel) this.chart.emit('marklinemove', args);
8030
8033
  }
@@ -8025,8 +8025,11 @@ System.register([], function (exports) {
8025
8025
  }
8026
8026
 
8027
8027
  if (moved) {
8028
- args.event.stopPropagation();
8029
- args.event.preventDefault(); // 阻止默认行为
8028
+ if (args.longtap === 2 && args.event) {
8029
+ args.event.preventDefault(); // 阻止默认行为
8030
+
8031
+ args.event.stopPropagation();
8032
+ }
8030
8033
 
8031
8034
  if (!args.cancel) this.chart.emit('marklinemove', args);
8032
8035
  }
package/example/bar.html CHANGED
@@ -53,7 +53,7 @@
53
53
  y: true
54
54
  },
55
55
  markLine: {
56
- longtap: true
56
+ longtap: true // 长按才出现标线
57
57
  },
58
58
  margin: {
59
59
  bottom: 2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jmchart",
3
- "version": "1.1.91",
3
+ "version": "1.1.92",
4
4
  "description": "chart",
5
5
  "main": "./index.js",
6
6
  "directories": {
@@ -130,9 +130,10 @@ export default class jmMarkLineManager {
130
130
  moved = true;
131
131
  }
132
132
  if(moved) {
133
- args.event.stopPropagation();
134
- args.event.preventDefault();// 阻止默认行为
135
-
133
+ if(args.longtap === 2 && args.event) {
134
+ args.event.preventDefault();// 阻止默认行为
135
+ args.event.stopPropagation();
136
+ }
136
137
 
137
138
  if(!args.cancel) this.chart.emit('marklinemove', args);
138
139
  }