@@ -1,6 +1,8 @@
|
|||||||
import Utility from './utility'
|
import Utility from './utility'
|
||||||
|
|
||||||
let Note = {
|
let Note = {
|
||||||
|
HIDE_DELAY: 250,
|
||||||
|
|
||||||
Box: {
|
Box: {
|
||||||
create: function(id) {
|
create: function(id) {
|
||||||
var $inner_border = $('<div/>');
|
var $inner_border = $('<div/>');
|
||||||
@@ -264,7 +266,7 @@ let Note = {
|
|||||||
|
|
||||||
hide: function(id) {
|
hide: function(id) {
|
||||||
var $note_body = Note.Body.find(id);
|
var $note_body = Note.Body.find(id);
|
||||||
Note.timeouts.push($.timeout(250).done(function() {$note_body.hide();}));
|
Note.timeouts.push(setTimeout(() => $note_body.hide(), Note.HIDE_DELAY));
|
||||||
},
|
},
|
||||||
|
|
||||||
hide_all: function() {
|
hide_all: function() {
|
||||||
@@ -762,10 +764,7 @@ let Note = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
clear_timeouts: function() {
|
clear_timeouts: function() {
|
||||||
$.each(Note.timeouts, function(i, v) {
|
Note.timeouts.forEach(clearTimeout);
|
||||||
v.clear();
|
|
||||||
});
|
|
||||||
|
|
||||||
Note.timeouts = [];
|
Note.timeouts = [];
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user