Commit 299e2384 authored by Marc Duez's avatar Marc Duez
Browse files

model.js : improve selection / multi-selection speed

remove selection limit
parent 49af63f5
......@@ -1370,9 +1370,6 @@ Model.prototype = {
*
* */
select: function (cloneID) {
var list = this.getSelected();
myConsole.log("select() (clone " + cloneID + ")");
if (cloneID == (this.n_windows - 1)) return 0
......@@ -1380,15 +1377,28 @@ Model.prototype = {
if (this.windows[cloneID].select) {
return;
} else {
if (list.length < 20) {
this.windows[cloneID].select = true;
this.addClonesSelected(cloneID);
this.windows[cloneID].select = true;
this.addClonesSelected(cloneID);
}
}
this.lastCloneSelected = cloneID;
this.updateElemStyle([cloneID]);
this.updateAlignmentButton();
},
multiSelect: function (list) {
myConsole.log("select() (clone " + list + ")");
for (var i=0; i<list.length; i++){
this.windows[list[i]].select = true;
this.addClonesSelected(list[i]);
}
this.lastCloneSelected = list[0];
this.updateElemStyle(list);
this.updateAlignmentButton();
},
/* kick a clone out of the selection
*
......
......@@ -1777,9 +1777,7 @@ ScatterPlot.prototype = {
this.active_selector = false;
if (!d3.event.ctrlKey) this.m.unselectAll()
for (var i = 0; i < nodes_selected.length; i++) {
this.m.select(nodes_selected[i])
}
this.m.multiSelect(nodes_selected)
}
}
}
......
......@@ -156,6 +156,7 @@ Segment.prototype = {
curH = seg.height(),
autoH = seg.css('height', 'auto').height();
if (autoH > 100){
if (autoH > 500) autoH = 500
seg.stop().height(curH).animate({height: autoH+5}, 250);
}else{
seg.stop().height(curH)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment