Skip to content

Commit

Permalink
Use load events for handling loading bar
Browse files Browse the repository at this point in the history
  • Loading branch information
donflopez authored May 29, 2017
1 parent 4f7742e commit 7c18975
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/geo/leaflet/leaflet-cartodb-webgl-layer-group-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ var LeafletCartoDBWebglLayerGroupView = function (layerGroupModel, leafletMap) {
var metric = Profiler.metric('tangram.rendering');

metric.start();

this.trigger('loading');

this.tangram = new TC(leafletMap, this.initConfig.bind(this, layerGroupModel));

this.tangram.onLoaded(function () {
if (metric) {
this.trigger('load');
metric.end();
metric = void 0;
}
Expand Down

1 comment on commit 7c18975

@pabletecodes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

Please sign in to comment.