From ef68faa33733833dd30d0cb285a2a6643aadc415 Mon Sep 17 00:00:00 2001 From: luchenqun Date: Sat, 24 Jun 2017 20:52:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=87=A0=E4=B8=AA=E5=8A=A8?= =?UTF-8?q?=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/scripts/controllers/tags-controller.js | 8 ++++++-- public/scripts/services/data-service.js | 6 +++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/public/scripts/controllers/tags-controller.js b/public/scripts/controllers/tags-controller.js index 324da4c..6273c43 100644 --- a/public/scripts/controllers/tags-controller.js +++ b/public/scripts/controllers/tags-controller.js @@ -121,7 +121,9 @@ app.controller('tagsCtr', ['$scope', '$filter', '$window', '$stateParams', '$tim dataService.transition($scope.showMode == 'item' ? '.js-tag-costomTag' : '.js-tags-table'); } $timeout(function() { - dataService.transition('#' + addBookmarkId); + dataService.transition('#' + addBookmarkId, { + duration: 1000, + }); addBookmarkId = -1; }, 1000); forbidTransition = false; @@ -508,7 +510,9 @@ app.controller('tagsCtr', ['$scope', '$filter', '$window', '$stateParams', '$tim bookmark.description = data.description; find = true; if ($scope.order[bookmark.type - 1]) { - dataService.transition('#' + bookmark.id); + dataService.transition('#' + bookmark.id, { + duration: 1000, + }); } } }) diff --git a/public/scripts/services/data-service.js b/public/scripts/services/data-service.js index 7e43f31..fdc402f 100644 --- a/public/scripts/services/data-service.js +++ b/public/scripts/services/data-service.js @@ -47,8 +47,8 @@ app.factory('dataService', [function() { animationIndex: 0, animation: function() { var data = ['scale', 'fade', 'fade up', 'fade down', 'fade left', 'fade right', 'horizontal flip', - 'vertical flip', 'drop', 'fly left', 'fly right', 'fly up', 'fly down', - 'browse', 'browse right', 'slide down', 'slide up', 'slide left', 'slide right' + 'vertical flip', 'drop', 'fly left', 'fly right', 'fly up', 'fly down', 'swing left', 'swing right', 'swing up', 'swing down', + 'browse', 'browse right', 'slide down', 'slide up', 'slide left', 'slide right', 'jiggle', 'shake', 'pulse', 'tada', 'bounce' ]; var t = data[parseInt(Math.random() * 1000) % data.length]; @@ -57,7 +57,7 @@ app.factory('dataService', [function() { transition: function(selector, params) { var data = {}; data.animation = (params && params.animation) ? params.animation : service.animation(); - data.duration = (params && params.duration) ? params.duration : 1000; + data.duration = (params && params.duration) ? params.duration : 500; data.onComplete = function() { if (params) { if (params.state == 'hide') {