comparison war/scripts/sti/DataObject.js @ 68:8b58d9bc0bb6 trimmed_data

add functionality for additional tabular data from the description field (work in progress)
author Sebastian Kruse <skruse@mpiwg-berlin.mpg.de>
date Thu, 03 Jan 2013 18:43:28 +0100
parents 775477d89709
children
comparison
equal deleted inserted replaced
67:5b049141a26e 68:8b58d9bc0bb6
8 * @param {float} lon the longitude value corresponding to the given place 8 * @param {float} lon the longitude value corresponding to the given place
9 * @param {float} lat the latitude value corresponding to the given place 9 * @param {float} lat the latitude value corresponding to the given place
10 * 10 *
11 * @constructor 11 * @constructor
12 */ 12 */
13 DataObject = function(name, description, place, timeStamp, timeSpan, granularity, lon, lat){ 13 DataObject = function(name, description, place, timeStamp, timeSpan, granularity, lon, lat, descriptionData){
14 14
15 this.name = name; 15 this.name = name;
16 this.description = description; 16 this.description = description;
17 this.timeStamp = timeStamp; 17 this.timeStamp = timeStamp;
18 this.timeSpan = timeSpan; 18 this.timeSpan = timeSpan;
19 this.granularity = granularity; 19 this.granularity = granularity;
20 this.longitude = lon; 20 this.longitude = lon;
21 this.latitude = lat; 21 this.latitude = lat;
22 22
23 this.descriptionData = descriptionData;
24
23 this.setPlaces(place); 25 this.setPlaces(place);
24 this.status = false; 26 this.status = false;
25 this.percentage = 0; 27 this.percentage = 0;
26 this.hoverSelect = false; 28 this.hoverSelect = false;
27 29
138 getPlace: function(level){ 140 getPlace: function(level){
139 if( level >= this.placeDetail.length ){ 141 if( level >= this.placeDetail.length ){
140 return this.placeDetail[this.placeDetail.length-1]; 142 return this.placeDetail[this.placeDetail.length-1];
141 } 143 }
142 return this.placeDetail[level]; 144 return this.placeDetail[level];
145 },
146
147 getDescriptionData: function(columnName){
148 if (this.descriptionData[columnName] != null)
149 return this.descriptionData[columnName];
150 else
151 return "";
143 } 152 }
144 153
145 }; 154 };