|
@@ -120,10 +120,8 @@
|
|
|
|
|
|
const chartDivs = ref([])
|
|
|
|
|
|
- const out_width = ref(1832)
|
|
|
+ const out_width = ref(1920)
|
|
|
const out_height = ref(1023)
|
|
|
- const out_top = ref(113)
|
|
|
- const out_total = out_height.value + out_top.value
|
|
|
const centerPoint = ref({})
|
|
|
|
|
|
|
|
@@ -132,10 +130,9 @@
|
|
|
centerPoint.value.y = out_height.value
|
|
|
console.log("圆心x:", centerPoint.value.x, "圆心y:", centerPoint.value.y)
|
|
|
let cc = document.getElementById("cc")
|
|
|
- // cc.style.left = centerPoint.value.x + "px"
|
|
|
- // cc.style.top = centerPoint.value.y + "px"
|
|
|
- cc.style.left = "916px"
|
|
|
- cc.style.top = "1023px"
|
|
|
+ cc.style.left = centerPoint.value.x + "px"
|
|
|
+ cc.style.top = centerPoint.value.y + "px"
|
|
|
+
|
|
|
|
|
|
chartDivs.value = [
|
|
|
document.getElementById("ring-chart1"),
|
|
@@ -165,11 +162,9 @@
|
|
|
let mouse_y = event.targetTouches[0].pageY;
|
|
|
console.log("touchX:", mouse_x, "touchY:", mouse_y)
|
|
|
let distance = Math.sqrt((Math.pow((centerPoint.value.x - mouse_x), 2) + Math.pow((centerPoint.value.y - mouse_y), 2)))
|
|
|
- console.log("total :", out_total, " r1 :", raduis_half[0], " r2:", raduis_half[1])
|
|
|
- console.log("半径1:", out_total - raduis_half[0], "半径2:", out_total - raduis_half[1])
|
|
|
|
|
|
console.log("dis:", distance)
|
|
|
- if (distance <= out_total - raduis_half[0] && distance > out_total - raduis_half[1]) {
|
|
|
+ if (distance <= out_height.value - raduis_half[0] && distance > out_height.value - raduis_half[1]) {
|
|
|
console.log("t1")
|
|
|
}
|
|
|
|