From c179863b48678366532730e1eb72cd780fd927f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20V=C3=A9ril?= Date: Thu, 28 Nov 2019 15:55:05 +0100 Subject: [PATCH] Change T1 from excitationBase to excitationValue --- static/js/data.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/static/js/data.js b/static/js/data.js index 1d45fc09..6bd1f67e 100644 --- a/static/js/data.js +++ b/static/js/data.js @@ -70,15 +70,15 @@ class DOI { } class excitationBase { - constructor(initial, final) { + constructor(initial, final,T1=null) { this.initial = initial; this.final = final - this.T1=NaN + this.T1=T1 } } class excitationValue extends excitationBase { - constructor(initial, final, value,corrected=null,oscilatorForces) { - super(initial, final) + constructor(initial, final, value,corrected=null,oscilatorForces=null,T1=null) { + super(initial, final,T1=null) this.value = value this.corrected = corrected this.oscilatorForces = oscilatorForces @@ -106,7 +106,7 @@ class excitation extends excitationBase { class dataFileBase { constructor() { this.molecule = '' - this.comment = null + this.comment = "" this.code = null this.method = null this.excitations = [] @@ -179,7 +179,8 @@ class dataFileBase { var val=((vals.length>=5) ? parseFloat(vals[6], 10): NaN) var cor=((vals.length>=6) ? parseFloat(vals[7], 10): NaN) var oscilatorForces=((vals.length>=7) ? parseFloat(vals[7],10): NaN) - var ex = new excitationValue(start, end, val,cor,oscilatorForces); + var T1=((vals.length>=8) ? parseFloat(vals[8],10): NaN) + var ex = new excitationValue(start, end, val,cor,oscilatorForces,T1); dat.excitations.push(ex); };