This commit is contained in:
yanran200730
2022-04-28 10:28:15 +08:00
parent e99ea5b2de
commit 7bbeb88804
2 changed files with 35 additions and 25 deletions

View File

@@ -140,7 +140,12 @@
const canvasInfo = document.querySelector(`#synergr-canvas`).getBoundingClientRect()
const seconds = 24 * 60 * 60
const x = e.clientX - canvasInfo.left + 100
if (x < 100) return
if (x < 100 || x > this.canvasWidth + 100) {
this.isHide = true
return false
}
const unit = seconds / this.canvasWidth * (x - 100)
this.left = x