Junjie
2023-12-18 2d36c9a2951ded9f74dcc1c7a37eaca86bc40591
src/main/webapp/views/console4.html
@@ -655,11 +655,11 @@
        if (shuttle.updateMoveStatus) {//动画执行完成才可继续执行动画
          shuttle.updateMoveStatus = false;//动画执行中
          // 计算两点之间的距离1
          const distance = Math.sqrt(Math.pow((item.point.x * width) - shuttle.x, 2) + Math.pow((item.point.y * height) - shuttle.y, 2));
          const distance = Math.sqrt(Math.pow((item.wcsPoint.x * width) - shuttle.x, 2) + Math.pow((item.wcsPoint.y * height) - shuttle.y, 2));
          gsap.killTweensOf(shuttle); // 杀死所有针对".class"的动画
          gsap.to(shuttle, {
            x: item.point.x * width, // 目标位置
            y: item.point.y * height, // 目标位置
            x: item.wcsPoint.x * width, // 目标位置
            y: item.wcsPoint.y * height, // 目标位置
            duration: distance / 100, // 动画持续时间(秒)
            ease: "power1.inOut", // 缓动类型
            onComplete: () => {