Fix layer pause on visibility update

feature/threejs-update
Robin Hawkes 2016-10-25 12:40:13 +01:00
rodzic d16da91256
commit 1fbe9d7555
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 1EC4C2D6765FA8CF
1 zmienionych plików z 10 dodań i 0 usunięć

Wyświetl plik

@ -117,6 +117,16 @@ class GeoJSONTileLayer extends TileLayer {
return new GeoJSONTile(quadcode, this._path, layer, newOptions);
}
hide() {
this._pauseOutput = true;
super.hide();
}
show() {
this._pauseOutput = false;
super.show();
}
// Destroys the layer and removes it from the scene and memory
destroy() {
this._world.off('preUpdate', this._throttledWorldUpdate);