Commit ecd37581 authored by Richard's avatar Richard

chart library works, I think. Took charts and sencha file from touch charts 2.0-dev

parent f44d7236
...@@ -5,7 +5,7 @@ Ext.Loader.setPath({ ...@@ -5,7 +5,7 @@ Ext.Loader.setPath({
//</debug> //</debug>
Ext.application({ Ext.application({
controllers: ["Lsm", "Main"], controllers: ["Lsm", "Main", "ChartController"],
models: ["SimulationModel", "SimulationDetails"], models: ["SimulationModel", "SimulationDetails"],
stores: ['SimulationStore', 'SimulationDetailsStore', 'SimulationsSummary', 'LsmStore'], stores: ['SimulationStore', 'SimulationDetailsStore', 'SimulationsSummary', 'LsmStore'],
......
...@@ -63,7 +63,6 @@ Ext.define('app.controller.Main', { ...@@ -63,7 +63,6 @@ Ext.define('app.controller.Main', {
'listpanel #summary': { 'listpanel #summary': {
itemtap: 'simulate', itemtap: 'simulate',
scroll: 'scroll'
}, },
'#mapa': { '#mapa': {
...@@ -108,19 +107,10 @@ Ext.define('app.controller.Main', { ...@@ -108,19 +107,10 @@ Ext.define('app.controller.Main', {
'listpanel #lsmsimulation-list':{ 'listpanel #lsmsimulation-list':{
itemtap: 'simulate', itemtap: 'simulate',
show: 'allo',
} }
} }
}, },
scroll: function(){
console.log('scroll');
},
allo: function(){
console.log("allo");
},
initiateCities: function(){ initiateCities: function(){
this.getSimOptionsButton().show(); this.getSimOptionsButton().show();
}, },
......
var drawComponent = new Ext.draw.Component({ // var drawComponent = new Ext.draw.Component({
items: [{ // config: {
type: 'circle', // width: 100,
fill: '#79BB3F', // },
radius: 100, // items: [{
x: 100, // type: 'circle',
y: 100 // fill: '#79BB3F',
}] // radius: 20,
// }]
// });
var chart = new Ext.chart.Chart({
width: 200,
height: 200,
animate: true,
}); });
Ext.define('app.view.Chart', { Ext.define('app.view.Chart', {
extend: 'Ext.Panel', extend: 'Ext.chart.Panel',
xtype: 'chartpanel', id: 'flood-chart',
xtype: 'floodChart',
config: { config: {
items: [drawComponent] width: 100,
height: 100,
draggable: true,
items: [chart]
} }
}); });
......
...@@ -27,9 +27,18 @@ Ext.define('app.view.Map', { ...@@ -27,9 +27,18 @@ Ext.define('app.view.Map', {
} }
}, },
getReference: function(){
return this.globalMap;
},
setGlobalMap: function(extmap, map){ setGlobalMap: function(extmap, map){
this.globalMap = map; this.globalMap = map;
this.globalExtMap = extmap; this.globalExtMap = extmap;
google.maps.event.addListener(map, 'click', function(){
console.log('click');
});
//this.globalMap.on('click', );
}, },
setCenterMap: function(center){ setCenterMap: function(center){
......
/*simulationpanel, this is the right side of the app, on flex 2*/
Ext.define('app.view.Simulation', { Ext.define('app.view.Simulation', {
extend: 'Ext.Panel', extend: 'Ext.Panel',
xtype: 'simulationpanel', xtype: 'simulationpanel',
...@@ -10,6 +11,11 @@ Ext.define('app.view.Simulation', { ...@@ -10,6 +11,11 @@ Ext.define('app.view.Simulation', {
xtype: 'toolbar', xtype: 'toolbar',
ui: 'charcoal', ui: 'charcoal',
title: 'Flood Simulation Browser', title: 'Flood Simulation Browser',
items: [{
id: 'create-chart',
xtype: 'button',
text: 'create chart',
}]
}, },
{ {
xtype: 'SimulationMap', xtype: 'SimulationMap',
......
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
</style> </style>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script id="microloader" type="text/javascript" src="sdk/microloader/development.js"></script> <script id="microloader" type="text/javascript" src="sdk/microloader/development.js"></script>
<script type="text/javascript" src="sdk/touch-charts-debug.js"></script> <script type="text/javascript" src="sdk/touch-charts.js"></script>
</head> </head>
<body> <body>
<div id="appLoadingIndicator"> <div id="appLoadingIndicator">
...@@ -131,4 +131,5 @@ ...@@ -131,4 +131,5 @@
<div></div> <div></div>
</div> </div>
</body> </body>
</html> </html>
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