修改显示

main
suixy 2 months ago
parent 3ee5563f9f
commit 6ff449f405

@ -97,6 +97,8 @@ watch(() => JSON.stringify(props.boxPos), (newVal, oldVal) => {
zoomScale(props.boxPos.y, 2) zoomScale(props.boxPos.y, 2)
} }
getBoxPos() getBoxPos()
} else {
zoomScale(props.boxPos.y, 0)
} }
} }
if (props.dotIndex >= 0) { if (props.dotIndex >= 0) {
@ -121,6 +123,8 @@ watch(() => props.dotIndex, (newVal, oldVal) => {
zoomScale(props.boxPos.y, 2) zoomScale(props.boxPos.y, 2)
} }
getBoxPos() getBoxPos()
} else {
zoomScale(props.boxPos.y, 0)
} }
} }
if (props.dotIndex >= 0) { if (props.dotIndex >= 0) {
@ -222,7 +226,7 @@ const leftTicks = computed(() => {
return arr return arr
} }
let factor = zoomType.value === 1 ? 10 : zoomType.value === 2 ? 50 : 1 let factor = zoomType.value === 1 ? Math.ceil(props.height / 100) : zoomType.value === 2 ? Math.ceil(props.height / 30) : 1
let step = Math.floor(10 / factor) let step = Math.floor(10 / factor)
if (step < 1) step = 1 if (step < 1) step = 1

Loading…
Cancel
Save