- Author:
- David Nickerson <david.nickerson@gmail.com>
- Date:
- 2021-09-16 00:41:19+12:00
- Desc:
- Updating Noble 1962 model:
* Exposing the membrane potential to the top-level model;
* adding SED-ML for the paced and pacemaker variants of the model.
Using OpenCOR Snapshot release 2021-09-14.
- Permanent Source URI:
- https://models.fieldml.org/workspace/a1/rawfile/f954e59183314cd37f86c8832dc81317d01c8ec5/dojo-presentation/js/dojo/dojox/grid/DataSelection.js
dojo.provide("dojox.grid.DataSelection");
dojo.require("dojox.grid.Selection");
dojo.declare("dojox.grid.DataSelection", dojox.grid.Selection, {
getFirstSelected: function(){
var idx = dojox.grid.Selection.prototype.getFirstSelected.call(this);
if(idx == -1){ return null; }
return this.grid.getItem(idx);
},
getNextSelected: function(inPrev){
var old_idx = this.grid.getItemIndex(inPrev);
var idx = dojox.grid.Selection.prototype.getNextSelected.call(this, old_idx);
if(idx == -1){ return null; }
return this.grid.getItem(idx);
},
getSelected: function(){
var result = [];
for(var i=0, l=this.selected.length; i<l; i++){
if(this.selected[i]){
result.push(this.grid.getItem(i));
}
}
return result;
},
addToSelection: function(inItemOrIndex){
var idx = null;
if(typeof inItemOrIndex == "number" || typeof inItemOrIndex == "string"){
idx = inItemOrIndex;
}else{
idx = this.grid.getItemIndex(inItemOrIndex);
}
dojox.grid.Selection.prototype.addToSelection.call(this, idx);
},
deselect: function(inItemOrIndex){
var idx = null;
if(typeof inItemOrIndex == "number" || typeof inItemOrIndex == "string"){
idx = inItemOrIndex;
}else{
idx = this.grid.getItemIndex(inItemOrIndex);
}
dojox.grid.Selection.prototype.deselect.call(this, idx);
},
deselectAll: function(inItemOrIndex){
var idx = null;
if(inItemOrIndex || typeof inItemOrIndex == "number"){
if(typeof inItemOrIndex == "number" || typeof inItemOrIndex == "string"){
idx = inItemOrIndex;
}else{
idx = this.grid.getItemIndex(inItemOrIndex);
}
dojox.grid.Selection.prototype.deselectAll.call(this, idx);
}else{
this.inherited(arguments);
}
}
});