Commit 8d3917ff authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

model.js: remember in .tOther the previously selected time/sample

parent c9ba91db
...@@ -72,7 +72,8 @@ Model.prototype = { ...@@ -72,7 +72,8 @@ Model.prototype = {
this.data = {}; this.data = {};
this.data_info = {}; this.data_info = {};
this.t = 0; this.t = 0; // Selected time/sample
this.tOther = 0; // Other (previously) selected time/sample
this.focus = -1; this.focus = -1;
this.system_selected = [] this.system_selected = []
...@@ -389,6 +390,10 @@ Model.prototype = { ...@@ -389,6 +390,10 @@ Model.prototype = {
self.samples.order = [] self.samples.order = []
for (var i = 0; i < self.samples.number; i++) self.samples.order.push(i); for (var i = 0; i < self.samples.number; i++) self.samples.order.push(i);
} }
if (self.samples.order.length >= 2) {
self.tOther = 1
}
if (typeof self.samples.names =='undefined'){ if (typeof self.samples.names =='undefined'){
self.samples.names = [] self.samples.names = []
for (var i = 0; i < self.samples.number; i++) self.samples.names.push(""); for (var i = 0; i < self.samples.number; i++) self.samples.names.push("");
...@@ -1479,6 +1484,7 @@ Model.prototype = { ...@@ -1479,6 +1484,7 @@ Model.prototype = {
* */ * */
changeTime: function (newT) { changeTime: function (newT) {
console.log("changeTime()" + newT) console.log("changeTime()" + newT)
this.tOther = this.t
this.t = newT; this.t = newT;
this.update(); this.update();
return this.t return this.t
......
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