优化gif演示

This commit is contained in:
Harvey Zack committed 2018-12-06 16:05:09 +08:00
1 parent 56eba5626e
commit 02c63e55e8
4 files changed
+25 -45

No files matched your search

+7 -2
View File
@@ -2772,6 +2772,7 @@
var isProcessing = false;
var pressStartTime = 0;
var progressTimer = null;
var isPress = false;
function cleanTimer() {
$progress.style.width = '0%';
@@ -2807,6 +2808,7 @@
html: 'GIF',
mounted: function mounted($gif) {
proxy($gif, 'mousedown', function () {
isPress = true;
cleanTimer();
pressStartTime = new Date();
notice.show(i18n.get('Long press, gif length is between 1 second and 5 seconds'));
@@ -2824,8 +2826,11 @@
}, 50);
})();
});
proxy($gif, 'mouseup', function () {
createGif();
proxy(document, 'mouseup', function () {
if (isPress) {
isPress = false;
createGif();
}
});
}
});