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