rexma-design 1.4.1 → 1.4.2

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.
@@ -76,10 +76,6 @@ const slideStart = ref({ x: 0, y: 0 });
76
76
  // 偏移量
77
77
  const translate = ref({ x: 0, y: 0 });
78
78
 
79
- function formatNumber(value: number) {
80
- return Number(value.toFixed(2));
81
- }
82
-
83
79
  /**
84
80
  * @description 改变缩放比例
85
81
  */
@@ -116,7 +112,7 @@ function changeScale(type: '+' | '-') {
116
112
  };
117
113
  scaleCenter.value = _scaleCenter;
118
114
  }
119
- scale.value = formatNumber(_scale);
115
+ scale.value = Number(_scale.toFixed(2));
120
116
  }
121
117
 
122
118
  /**
@@ -259,14 +255,15 @@ function onImageClick(e: TouchEvent) {
259
255
  y: e.detail.y,
260
256
  };
261
257
  const clickPoint = {
262
- x: formatNumber(clickDetail.x - mapRect.x),
263
- y: formatNumber(clickDetail.y - mapRect.y),
258
+ x: clickDetail.x - mapRect.x,
259
+ y: clickDetail.y - mapRect.y,
264
260
  };
265
- const originScale = formatNumber(mapRect.width / mapInstanceInfo.value.originWidth);
261
+ const originScale = mapRect.width / mapInstanceInfo.value.originWidth;
266
262
  const originPoint = {
267
- x: formatNumber(clickPoint.x / originScale),
268
- y: formatNumber(clickPoint.y / originScale),
263
+ x: clickPoint.x / originScale,
264
+ y: clickPoint.y / originScale,
269
265
  };
266
+ console.log(originPoint, '点击的原始位置');
270
267
  const currentMark = (props.marks || []).find((item) => {
271
268
  return (
272
269
  originPoint.x >= item.start[0] &&
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "id": "rexma-design",
3
3
  "name": "rexma-design",
4
4
  "displayName": "rexma-design",
5
- "version": "1.4.1",
5
+ "version": "1.4.2",
6
6
  "description": "rexma-design",
7
7
  "author": "mqyun",
8
8
  "keywords": [