[Commits] r2271 - in sandbox/tschaub/trackanimator/geoext.ux/ux/TrackAnimator: build lib/GeoExt.ux

commits at geoext.org commits at geoext.org
Thu Aug 12 21:37:08 CEST 2010


Author: tschaub
Date: 2010-08-12 21:37:08 +0200 (Thu, 12 Aug 2010)
New Revision: 2271

Modified:
   sandbox/tschaub/trackanimator/geoext.ux/ux/TrackAnimator/build/ux.js
   sandbox/tschaub/trackanimator/geoext.ux/ux/TrackAnimator/lib/GeoExt.ux/TrackAnimator.js
Log:
Extra comma.

Modified: sandbox/tschaub/trackanimator/geoext.ux/ux/TrackAnimator/build/ux.js
===================================================================
--- sandbox/tschaub/trackanimator/geoext.ux/ux/TrackAnimator/build/ux.js	2010-08-12 19:32:08 UTC (rev 2270)
+++ sandbox/tschaub/trackanimator/geoext.ux/ux/TrackAnimator/build/ux.js	2010-08-12 19:37:08 UTC (rev 2271)
@@ -1,5 +1,5 @@
-Ext.namespace("GeoExt.ux");GeoExt.ux.TrackAnimator=Ext.extend(Ext.Container,{textReset:"reset",textPlay:"play",textStop:"stop",textRepeat:"repeat",url:null,protocolOptions:null,formatOptions:null,store:null,layer:null,span:60,speed:10,frameRate:6,repeat:false,aggressive:true,playing:false,initComponent:function(){if(!this.store){var formatOptions=Ext.apply(this.formatOptions||{},{extractTracks:true});var protocolOptions=Ext.apply(this.protocolOptions||{},{url:this.url,format:new OpenLayers.Format.KML(formatOptions)});this.store=new GeoExt.data.FeatureStore({fields:[{name:"when",type:"date"},{name:"heading",type:"number"},{name:"tilt",type:"number"},{name:"roll",type:"number"},{name:"trackId",type:"string"}],proxy:new GeoExt.data.ProtocolProxy({protocol:new OpenLayers.Protocol.HTTP(protocolOptions)}),autoLoad:true,listeners:{load:function(store){this.startTime=Number.POSITIVE_INFINITY;this.endTime=Number.NEGATIVE_INFINITY;store.each(function(rec){var when=rec.get("when").getTime();if(when<this.startTime){this.startTime=when;}if(when>this.endTime){this.endTime=when;}},this);this.slider.minValue=this.startTime;this.slider.maxValue=this.endTime;this.slider.setValue(this.startTime);this.slider.enable();this.updateDisplay();},scope:this}});}
-this.dateDisplay=new Ext.BoxComponent({cls:"gxux-trackanimator-datedisplay",autoEl:{tag:"div",html:""}});this.slider=new Ext.Slider({cls:"gxux-trackanimator-slider",disabled:true,listeners:{change:function(){if(this.aggressive){this.updateDisplay.apply(this,arguments);}},changecomplete:this.updateDisplay,scope:this}});this.items=[this.dateDisplay,this.slider,{xtype:"toolbar",buttonAlign:"center",cls:"gxux-trackanimator-toolbar",items:[{xtype:"button",tooltip:this.textReset,iconCls:"gxux-icon-start",handler:function(){this.reset();},scope:this},{xtype:"button",tooltip:this.textPlay,iconCls:"gxux-icon-play",handler:function(){this.play();},scope:this},{xtype:"button",tooltip:this.textStop,iconCls:"gxux-icon-stop",handler:function(){this.stop();},scope:this},{xtype:"button",tooltip:this.textRepeat,enableToggle:true,pressed:this.repeat,iconCls:"gxux-icon-repeat",handler:function(button){this.repeat=!!button.pressed},scope:this}]}];GeoExt.ux.TrackAnimator.superclass.initComponent.call(this);},updateDisplay:function(){var maxTime=this.slider.getValue();var minTime=maxTime-(this.span*1000);var trackIds={};this.store.filterBy(function(rec){var when=rec.get("when").getTime();var include=minTime<=when&&maxTime>=when;if(include){var trackId=rec.get("trackId");var feature=rec.data.feature;var obj=trackIds[trackId];if(!obj){obj={points:[]};trackIds[trackId]=obj;}
+Ext.namespace("GeoExt.ux");GeoExt.ux.TrackAnimator=Ext.extend(Ext.Container,{textReset:"reset",textPlay:"play",textStop:"stop",textRepeat:"repeat",url:null,protocolOptions:null,formatOptions:null,store:null,layer:null,span:60,speed:10,frameRate:6,repeat:false,aggressive:true,playing:false,initComponent:function(){this.addEvents("load","exception");if(!this.store){var formatOptions=Ext.apply(this.formatOptions||{},{extractTracks:true});var protocolOptions=Ext.apply(this.protocolOptions||{},{url:this.url,format:new OpenLayers.Format.KML(formatOptions)});this.store=new GeoExt.data.FeatureStore({fields:[{name:"when",type:"date"},{name:"heading",type:"number"},{name:"tilt",type:"number"},{name:"roll",type:"number"},{name:"trackId",type:"string"}],proxy:new GeoExt.data.ProtocolProxy({protocol:new OpenLayers.Protocol.HTTP(protocolOptions)}),autoLoad:true,listeners:{load:function(store){this.startTime=Number.POSITIVE_INFINITY;this.endTime=Number.NEGATIVE_INFINITY;store.each(function(rec){var when=rec.get("when").getTime();if(when<this.startTime){this.startTime=when;}if(when>this.endTime){this.endTime=when;}},this);this.slider.minValue=this.startTime;this.slider.maxValue=this.endTime;this.slider.setValue(this.startTime);this.slider.enable();this.updateDisplay();},scope:this}});}
+this.relayEvents(this.store,["load","exception"]);this.dateDisplay=new Ext.BoxComponent({cls:"gxux-trackanimator-datedisplay",autoEl:{tag:"div",html:""}});this.slider=new Ext.Slider({cls:"gxux-trackanimator-slider",disabled:true,listeners:{change:function(){if(this.aggressive){this.updateDisplay.apply(this,arguments);}},changecomplete:this.updateDisplay,scope:this}});this.items=[this.dateDisplay,this.slider,{xtype:"toolbar",buttonAlign:"center",cls:"gxux-trackanimator-toolbar",items:[{xtype:"button",tooltip:this.textReset,iconCls:"gxux-icon-start",handler:function(){this.reset();},scope:this},{xtype:"button",tooltip:this.textPlay,iconCls:"gxux-icon-play",handler:function(){this.play();},scope:this},{xtype:"button",tooltip:this.textStop,iconCls:"gxux-icon-stop",handler:function(){this.stop();},scope:this},{xtype:"button",tooltip:this.textRepeat,enableToggle:true,pressed:this.repeat,iconCls:"gxux-icon-repeat",handler:function(button){this.repeat=!!button.pressed},scope:this}]}];GeoExt.ux.TrackAnimator.superclass.initComponent.call(this);},updateDisplay:function(){var maxTime=this.slider.getValue();var minTime=maxTime-(this.span*1000);var trackIds={};this.store.filterBy(function(rec){var when=rec.get("when").getTime();var include=minTime<=when&&maxTime>=when;if(include){var trackId=rec.get("trackId");var feature=rec.data.feature;var obj=trackIds[trackId];if(!obj){obj={points:[]};trackIds[trackId]=obj;}
 obj.points.push(feature.geometry);obj.attributes=feature.attributes;}
 return include;});if(this.layer){this.layer.removeAllFeatures();var tracks=[];var heads=[];var obj;for(var trackId in trackIds){obj=trackIds[trackId];tracks.push(new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LineString(obj.points),obj.attributes));heads.push(new OpenLayers.Feature.Vector(obj.points[obj.points.length-1].clone(),obj.attributes));}
 this.layer.addFeatures(tracks.concat(heads));}

Modified: sandbox/tschaub/trackanimator/geoext.ux/ux/TrackAnimator/lib/GeoExt.ux/TrackAnimator.js
===================================================================
--- sandbox/tschaub/trackanimator/geoext.ux/ux/TrackAnimator/lib/GeoExt.ux/TrackAnimator.js	2010-08-12 19:32:08 UTC (rev 2270)
+++ sandbox/tschaub/trackanimator/geoext.ux/ux/TrackAnimator/lib/GeoExt.ux/TrackAnimator.js	2010-08-12 19:37:08 UTC (rev 2271)
@@ -140,7 +140,7 @@
              *  request.  Listeners will receive the arguments included in the 
              *  store exception event. 
              */
-            "exception",
+            "exception"
         );
 
         



More information about the Commits mailing list