jmgraph 3.2.10 → 3.2.11
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.js
CHANGED
|
@@ -3928,11 +3928,12 @@ var jmUtils = exports.jmUtils = exports["default"] = /*#__PURE__*/function () {
|
|
|
3928
3928
|
key: "getEventPosition",
|
|
3929
3929
|
value: function getEventPosition(evt, scale) {
|
|
3930
3930
|
evt = evt || event;
|
|
3931
|
+
var isWXMiniApp = evt.isWXMiniApp;
|
|
3931
3932
|
var isTouch = false;
|
|
3932
3933
|
var touches = evt.changedTouches || evt.targetTouches || evt.touches;
|
|
3933
3934
|
var target = evt.target || evt.srcElement;
|
|
3934
3935
|
if (touches && touches.length) {
|
|
3935
|
-
evt = touches[0]; //兼容touch事件
|
|
3936
|
+
evt = touches[0]; //兼容touch事件
|
|
3936
3937
|
if (!evt.target) evt.target = target;
|
|
3937
3938
|
isTouch = true;
|
|
3938
3939
|
}
|
|
@@ -3944,7 +3945,7 @@ var jmUtils = exports.jmUtils = exports["default"] = /*#__PURE__*/function () {
|
|
|
3944
3945
|
var oy = evt.offsetY;
|
|
3945
3946
|
if (typeof ox === 'undefined' && typeof oy === 'undefined') {
|
|
3946
3947
|
// 小程序下取x,y就是它的相对坐标
|
|
3947
|
-
if (
|
|
3948
|
+
if (isWXMiniApp) {
|
|
3948
3949
|
ox = evt.x;
|
|
3949
3950
|
oy = evt.y;
|
|
3950
3951
|
} else {
|
|
@@ -3972,7 +3973,8 @@ var jmUtils = exports.jmUtils = exports["default"] = /*#__PURE__*/function () {
|
|
|
3972
3973
|
x: ox,
|
|
3973
3974
|
y: oy,
|
|
3974
3975
|
isTouch: isTouch,
|
|
3975
|
-
touches: touches
|
|
3976
|
+
touches: touches,
|
|
3977
|
+
isWXMiniApp: isWXMiniApp
|
|
3976
3978
|
};
|
|
3977
3979
|
}
|
|
3978
3980
|
|