Skip to content

Commit

Permalink
update event names
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickarlt committed Apr 11, 2014
1 parent 7a1eac7 commit 8e777dc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions leaflet.shpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@ L.Shapefile =L.GeoJSON.extend({
},
addFileData:function(file){
var self = this;
self.fire('loading');
self.fire('data:loading');
if(typeof file !== 'string' && !('byteLength' in file)){
var data = self.addData(file);
self.fire('load');
self.fire('data:loaded');
return data;
}
if(self.worker){
self.worker.data(cw.makeUrl(file)).then(function(data){
self.addData(data);
self.fire('load');
self.fire('data:loaded');
});
}else{
shp(file).then(function(data){
self.addData(data);
self.fire('load');
self.fire('data:loaded');
});
}
return this;
Expand Down

0 comments on commit 8e777dc

Please sign in to comment.