some redesign for better garbage collection of elements

This commit is contained in:
j 2011-11-04 22:14:30 +00:00
commit 1d09d19423
17 changed files with 129 additions and 101 deletions

View file

@ -195,16 +195,10 @@ Ox.SplitPanel = function(options, self) {
that.$elements[pos] = element
.css(self.edges[2], (parseInt(element.css(self.edges[2])) || 0) + 'px')
.css(self.edges[3], (parseInt(element.css(self.edges[3])) || 0) + 'px');
// fixme: it would be better to call removeElement here,
// or have a custom replaceElement function that removes event handlers
//self.options.elements[pos].element.replaceWith(element.$element.$element || element.$element)
//self.options.elements[pos].element = element;
///*
Ox.Log('Panel', 'REPLACE ELEMENT')
self.options.elements[pos].element.replaceWith(
self.options.elements[pos].element = element
);
//*/
setSizes();
self.$resizebars.forEach(function($resizebar, i) {
$resizebar.options({