压线精度调整
This commit is contained in:
@@ -51,7 +51,6 @@ const onClick = async (e) => {
|
||||
const clickYInContainer = e.detail.y - rect.value.top;
|
||||
let target = clickYInContainer * scale.value - viewportH / 2;
|
||||
target = Math.max(0, Math.min(contentH - viewportH, target));
|
||||
console.log(target);
|
||||
setTimeout(() => {
|
||||
scrollTop.value = target > 180 ? target + 10 : target;
|
||||
}, 200);
|
||||
@@ -66,7 +65,8 @@ const onClick = async (e) => {
|
||||
props.id,
|
||||
newArrow.x / scale.value - rect.value.width * 0.05,
|
||||
newArrow.y / scale.value - rect.value.width * 0.05,
|
||||
rect.value.width * 0.9
|
||||
rect.value.width * 0.9,
|
||||
(10 * scale.value) / 2
|
||||
);
|
||||
arrow.value = {
|
||||
...newArrow,
|
||||
@@ -130,7 +130,8 @@ const onDrag = async (e) => {
|
||||
props.id,
|
||||
arrow.value.x / scale.value - rect.value.width * 0.05,
|
||||
arrow.value.y / scale.value - rect.value.width * 0.05,
|
||||
rect.value.width * 0.9
|
||||
rect.value.width * 0.9,
|
||||
(10 * scale.value) / 2
|
||||
);
|
||||
|
||||
arrow.value.x = arrow.value.x / side;
|
||||
@@ -212,7 +213,11 @@ onMounted(async () => {
|
||||
:x="arrow ? rect.width * arrow.x : 0"
|
||||
:y="arrow ? rect.width * arrow.y : 0"
|
||||
>
|
||||
<view class="point"> </view>
|
||||
<view
|
||||
class="point"
|
||||
:style="{ minWidth: 10 * scale + 'px', minHeight: 10 * scale + 'px' }"
|
||||
>
|
||||
</view>
|
||||
<view v-if="arrow" class="edit-buttons" @touchstart.stop>
|
||||
<view class="edit-btn-text">
|
||||
<text>{{ arrow.ring === 0 ? "M" : arrow.ring }}</text>
|
||||
|
||||
Reference in New Issue
Block a user