From 1e70e25352f528a1be71a22edcb9c4491c25fef5 Mon Sep 17 00:00:00 2001 From: zouap Date: Fri, 27 May 2022 20:27:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- custom/public/rotation3D/rotation3D.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/custom/public/rotation3D/rotation3D.js b/custom/public/rotation3D/rotation3D.js index da37ee43b..92e396695 100644 --- a/custom/public/rotation3D/rotation3D.js +++ b/custom/public/rotation3D/rotation3D.js @@ -235,7 +235,7 @@ Rotation3D.prototype.lineStyle = function($line, index, rotation) { Rotation3D.prototype.goTo = function (index) { var self = this; this.currenIndex = index; - console.log('currenIndex', index); + console.log('goTo currenIndex', index); /** * 1.计算floatIndex,用于控死amdiff */ @@ -293,7 +293,7 @@ Rotation3D.prototype.scheduleNextFrame = function () { */ Rotation3D.prototype.render = function () { var self=this; - + console.log("render...."); // 图形间隔:弧度 var spacing = 2 * Math.PI / this.$item.length; var itemRotation = this.rotation; @@ -319,6 +319,7 @@ Rotation3D.prototype.onAutoPlay = function () { if (self.currenIndex < 0) { self.currenIndex = self.length - 1 } + console.log("autoPlayTimer...."); self.goTo(self.currenIndex); self.currenIndex--; //倒叙 }, this.autoPlayDelay) @@ -330,12 +331,12 @@ Rotation3D.prototype.onAutoPlay = function () { Rotation3D.prototype.onDrag = function () { var self = this; var startX, startY, moveX, moveY, endX, endY; - + console.log("onDrag...."); // 拖拽:三个事件-按下 移动 抬起 //按下 this.$rotation.mousedown(function (e) { startX = e.pageX; startY = e.pageY; - + console.log("mousedown...."); // 移动 $(document).mousemove(function (e) { // console.log('移动'); @@ -347,7 +348,7 @@ Rotation3D.prototype.onDrag = function () { $(document).mouseup(function (e) { endX = e.pageX; endY = e.pageY; moveX = endX - startX; moveY = endY - startY; - + console.log("mouseup...."); // 每40旋转一步 var moveIndex = parseInt(Math.abs(moveX) / 50) console.log('moveIndex',moveIndex)