Commit 5d36ef17 authored by icyrizard's avatar icyrizard

worked on scriptie

parent 223cd78f
This diff is collapsed.
...@@ -37,7 +37,9 @@ ...@@ -37,7 +37,9 @@
%\cfoot{} %\cfoot{}
%\rfoot{\thepage} %\rfoot{\thepage}
\lstset{
tabsize=2,
}
\setlength{\parindent}{0pt} \setlength{\parindent}{0pt}
\setlength{\parskip}{10pt} \setlength{\parskip}{10pt}
......
...@@ -224,7 +224,7 @@ Ext.define('app.controller.Main', { ...@@ -224,7 +224,7 @@ Ext.define('app.controller.Main', {
} }
} }
var store = Ext.getStore('SimulationDetailsStore'); var store = Ext.getStore('FloodDetailStore');
/*Get visbounds, for later use in overlay map*/ /*Get visbounds, for later use in overlay map*/
store.each(function(r) { store.each(function(r) {
...@@ -280,7 +280,7 @@ Ext.define('app.controller.Main', { ...@@ -280,7 +280,7 @@ Ext.define('app.controller.Main', {
store.clearFilter(); store.clearFilter();
store.filter("area_id", area_id); store.filter("area_id", area_id);
/*push the side panel, in future create the view somewhere else*/ /*push the side panel*/
if (this.SimulType == 'Flood') if (this.SimulType == 'Flood')
{ {
this.setThumb(center); this.setThumb(center);
...@@ -289,11 +289,11 @@ Ext.define('app.controller.Main', { ...@@ -289,11 +289,11 @@ Ext.define('app.controller.Main', {
else if(this.SimulType == 'Lsm') else if(this.SimulType == 'Lsm')
this.getSidepanel().push(this.getLsmSimulation()); this.getSidepanel().push(this.getLsmSimulation());
/*set thumb images*/
/*the store with details of the of the simulation*/
var store = Ext.getStore('SimulationDetailsStore');
/*change url, a short coming of the store object of sencha touch*/ /*the store with details of the simulation*/
var store = Ext.getStore('FloodDetailStore');
/*change url of the store, a short coming of the store object of sencha touch*/
store.setUrl(area_id); store.setUrl(area_id);
store.load(); store.load();
......
Ext.define('app.store.FloodDetailStore', {
extend: 'Ext.data.Store',
requires: ['Ext.data.proxy.Rest'],
xtype: 'FloodDetailStore',
config: {
autoLoad: true,
model: 'app.model.SimulationDetails',
fields: ['name', 'center', 'corners', 'size', 'extents', 'visbounds', 'vissize', 'projection', 'dikes'],
proxy: {
type: 'rest',
url: 'http://sangkil.science.uva.nl:8003/area/1/info.json',
reader: {
type: 'json',
},
},
listeners: {
}
},
setUrl: function(area_id) {
var store = Ext.getStore('FloodDetailStore').getProxy();
store._url = 'http://sangkil.science.uva.nl:8003/area/' + area_id + '/info.json';
},
});
\ No newline at end of file
/*Used to fill the chart with data*/
Ext.define('app.store.chartStore', { Ext.define('app.store.chartStore', {
extend: 'Ext.data.JsonStore', extend: 'Ext.data.JsonStore',
config : { config : {
fields: ['time', 'volume'], fields: ['time', 'volume']
// data: [
// {'name':'metric one', 'data1':10, 'data2':12, 'data3':14, 'data4':8, 'data5':13},
// {'name':'metric two', 'data1':7, 'data2':8, 'data3':16, 'data4':10, 'data5':3},
// {'name':'metric three', 'data1':5, 'data2':2, 'data3':14, 'data4':12, 'data5':7},
// {'name':'metric four', 'data1':2, 'data2':14, 'data3':6, 'data4':1, 'data5':23},
// {'name':'metric five', 'data1':27, 'data2':38, 'data3':36, 'data4':13, 'data5':33}
// ]
} }
}); });
\ No newline at end of file
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