comparison src/app/query-select.component.ts @ 61:6adf95d9a190 webpack

fix missing resultInfo. add column template for WITNESS.
author Robert Casties <casties@mpiwg-berlin.mpg.de>
date Mon, 24 Apr 2017 19:39:25 +0200
parents d7c947909ab8
children
comparison
equal deleted inserted replaced
60:7b9d616695d3 61:6adf95d9a190
97 this.setup(); 97 this.setup();
98 } 98 }
99 99
100 setup() { 100 setup() {
101 console.log("query-select setup step=", this.queryStep); 101 console.log("query-select setup step=", this.queryStep);
102 var step = this._queryService.state.steps[this.index]; // i-1? 102 // get result info from last step
103 let laststep = this._queryService.state.steps[this.index-1];
104 if (laststep != null) {
105 this.resultInfo = laststep.resultInfo;
106 }
107 // set up current step
108 let step = this._queryService.state.steps[this.index]; // i-1?
103 if (step != null) { 109 if (step != null) {
104 this.setQueryStep(step); 110 this.setQueryStep(step);
105 } 111 }
106 } 112 }
107 113
223 setQueryStep(step: QueryStep) { 229 setQueryStep(step: QueryStep) {
224 let mode = step.mode; 230 let mode = step.mode;
225 this.selectedMode = mode; 231 this.selectedMode = mode;
226 if (mode.id === 'id_is') { 232 if (mode.id === 'id_is') {
227 /* 233 /*
228 * id_is 234 * id_is
229 */ 235 */
230 this.queryInput = step.params.value; 236 this.queryInput = step.params.value;
231 237
232 } else if (mode.id === 'type_is') { 238 } else if (mode.id === 'type_is') {
233 /* 239 /*
234 * type_is 240 * type_is
273 this.queryOptions = [name]; 279 this.queryOptions = [name];
274 this.selectedOption = name; 280 this.selectedOption = name;
275 this.queryInput = step.params.value; 281 this.queryInput = step.params.value;
276 } 282 }
277 // TODO: implement other modes 283 // TODO: implement other modes
278 this.resultInfo = step.resultInfo;
279 } 284 }
280 } 285 }