编辑标签逻辑更新

This commit is contained in:
luchenqun 2017-02-26 22:45:34 +08:00
parent 7fa119a4b5
commit 33039fc86f
2 changed files with 22 additions and 18 deletions

View File

@ -188,6 +188,7 @@ app.controller('bookmarksCtr', ['$scope', '$state', '$stateParams', '$filter', '
setTimeout(updateEditPos, 100); setTimeout(updateEditPos, 100);
function updateEditPos() { function updateEditPos() {
setTimeout(function() {
if ($scope.showStyl == 'navigate') { if ($scope.showStyl == 'navigate') {
var top = $('.js-segment-navigate').offset().top; var top = $('.js-segment-navigate').offset().top;
var left = $('.js-segment-navigate').offset().left; var left = $('.js-segment-navigate').offset().left;
@ -198,5 +199,6 @@ app.controller('bookmarksCtr', ['$scope', '$state', '$stateParams', '$filter', '
left: left + width - 10, left: left + width - 10,
}) })
} }
}, 100)
} }
}]); }]);

View File

@ -291,6 +291,7 @@ app.controller('tagsCtr', ['$scope', '$filter', '$window', '$stateParams', '$tim
setTimeout(updateEditPos, 10000); setTimeout(updateEditPos, 10000);
function updateEditPos() { function updateEditPos() {
setTimeout(function() {
var top = $('.js-tags').offset().top; var top = $('.js-tags').offset().top;
var left = $('.js-tags').offset().left; var left = $('.js-tags').offset().left;
var width = $('.js-tags').width(); var width = $('.js-tags').width();
@ -299,6 +300,7 @@ app.controller('tagsCtr', ['$scope', '$filter', '$window', '$stateParams', '$tim
top: top + 10, top: top + 10,
left: left + width - 10, left: left + width - 10,
}) })
}, 100)
} }
}]); }]);