From 88793b4e26fb0d5e0febf26d8e3e1d7026727f02 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Sat, 21 Feb 2009 16:30:37 -0700 Subject: [PATCH] Fix select all in dimp --- imp/js/src/ViewPort.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/imp/js/src/ViewPort.js b/imp/js/src/ViewPort.js index ec4f6ccbb..05cd31b88 100644 --- a/imp/js/src/ViewPort.js +++ b/imp/js/src/ViewPort.js @@ -820,7 +820,10 @@ var ViewPort = Class.create({ // add = (boolean) Whether to set/unset flag. _updateClass: function(vs, flag, add) { - vs.get('div').each(function(d) { + var divs = vs.get('div'), + sel = new ViewPort_Selection(this._getBuffer(), 'div', divs); + + divs.each(function(d) { if (add) { d.addClassName(flag); } else { @@ -828,8 +831,9 @@ var ViewPort = Class.create({ } }, this); + if (this.opts.onUpdateClass) { - vs.get('dataob').each(function(d) { + sel.get('dataob').each(function(d) { this.opts.onUpdateClass(d); }, this); } -- 2.11.0