From 603ee1549c4a6315924e1380b4006e93f7251d11 Mon Sep 17 00:00:00 2001 From: jljsj Date: Wed, 12 Aug 2015 15:38:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8A=A8=E7=94=BB=E9=87=8C?= =?UTF-8?q?=E7=9A=84easeing=E7=9A=84demo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/motion.js | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/static/motion.js b/static/motion.js index cb07202d65..b428404ffd 100644 --- a/static/motion.js +++ b/static/motion.js @@ -554,7 +554,11 @@ $(function () { str += 'L' + (c_x + ii) + "," + (c_y - c_h * at); } } else { - str += "L100 250" + "L" + tt_w + "," + ct_y; + if (open !== 'null') { + str += "L100 250" + "L" + tt_w + "," + ct_y; + } else { + str += "M100 250"; + } } } tb.drawPath({ @@ -588,12 +592,12 @@ $(function () { } str += "L" + (c_w + c_x + 20) + "," + c_y; } else { - str += "L" + (c_w + c_x ) + "," + c_y + "L" + (c_w + c_x + 20) + "," + c_y; - /*if (self.data.lineData[i].endEaseName !== "null") { + //str += "L" + (c_w + c_x ) + "," + c_y + "L" + (c_w + c_x + 20) + "," + c_y; + if (end !== "null") { str += "L" + (c_w + c_x ) + "," + c_y + "L" + (c_w + c_x + 20) + "," + c_y; } else { str += "L" + e_x + "," + ct_y; - }*/ + } } } tb.drawPath({ @@ -709,14 +713,27 @@ $(function () { _x = {y: 20}; cx = {y: self.data.mask ? 240 : 180}; } - if (self.data.lineData[i].endEaseName !== "null") { - _x.ease = oease, cx.ease = eease, cx.delay = self.d_time; - } else { + if (self.data.lineData[i].openEaseName === "null" && self.data.lineData[i].endEaseName === "null") { var t = cx; cx = {}; cx.startAt = t; cx.delay = self.d_time; - _x.ease = oease, cx.ease = eease; + var tt = _x; + _x = {}; + _x.startAt = tt; + } else if (self.data.lineData[i].openEaseName === "null") { + var tt = _x; + _x = {}; + _x.startAt = tt; + cx.ease = eease,cx.delay = self.d_time; + } else if (self.data.lineData[i].endEaseName === "null") { + var t = cx; + cx = {}; + cx.startAt = t; + cx.delay = self.d_time; + _x.ease = oease; + } else { + _x.ease = oease, cx.ease = eease, cx.delay = self.d_time; } ctl.to(ciric, self.t_time, _x).to(ciric, self.t_time, cx); self.tweenArr.push(ctl);