forked from 0x2620/oxjs
some redesign for better garbage collection of elements
This commit is contained in:
parent
01f02d9730
commit
1d09d19423
17 changed files with 129 additions and 101 deletions
|
|
@ -541,7 +541,7 @@ Ox.Dialog = function(options, self) {
|
|||
self.$content.animate({
|
||||
opacity: 0
|
||||
}, 250, function() {
|
||||
$(this).remove() // fixme: removeElement?
|
||||
$(this).remove();
|
||||
});
|
||||
self.options.content.css({
|
||||
opacity: 0
|
||||
|
|
@ -649,7 +649,7 @@ Ox.Dialog = function(options, self) {
|
|||
that.animate({
|
||||
opacity: 0
|
||||
}, 250, function() {
|
||||
// that.removeElement();
|
||||
// that.remove();
|
||||
that.hide();
|
||||
callback && callback();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ Ox.Layer = function(options, self) {
|
|||
});
|
||||
|
||||
function click() {
|
||||
that.triggerEvent('click').removeElement();
|
||||
that.triggerEvent('click').remove();
|
||||
}
|
||||
|
||||
function mousedown() {
|
||||
|
|
@ -39,7 +39,7 @@ Ox.Layer = function(options, self) {
|
|||
if (self.options.type == 'dialog') {
|
||||
Ox.UI.$window.unbind({mouseup: mouseup});
|
||||
}
|
||||
that.removeElement();
|
||||
that.remove();
|
||||
};
|
||||
|
||||
that.show = function() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue