Ver código fonte

remove the Cesium.when

tags/2.12.0
Caven Chen 3 anos atrás
pai
commit
0200c840b1
2 arquivos alterados com 4 adições e 4 exclusões
  1. 2
    2
      libs/s3m/S3MTiles/S3MTile.js
  2. 2
    2
      libs/s3m/S3MTiles/S3MTilesLayer.js

+ 2
- 2
libs/s3m/S3MTiles/S3MTile.js Ver arquivo

@@ -385,7 +385,7 @@ S3MTile.prototype.requestContent = function() {
}

this.contentState = ContentState.LOADING
this.contentReadyPromise = new Promise()
this.contentReadyPromise = Promise
let contentFailedFunction = getContentFailedFunction(this)

promise
@@ -397,7 +397,7 @@ S3MTile.prototype.requestContent = function() {

contentReadyFunction(layer, that, arrayBuffer)
})
.otherwise(function(error) {
.catch(function(error) {
if (request.state === Cesium.RequestState.CANCELLED) {
that.contentState = ContentState.UNLOADED
return

+ 2
- 2
libs/s3m/S3MTiles/S3MTilesLayer.js Ver arquivo

@@ -54,7 +54,7 @@ function S3MTilesLayer(options) {
distance: Number.MAX_VALUE,
pixel: Number.MAX_VALUE
}
this._readyPromise = new Promise()
this._readyPromise = Promise

this.loadConfig(options.url)
}
@@ -205,7 +205,7 @@ S3MTilesLayer.prototype.loadConfig = function(url) {

that._readyPromise.resolve(that)
})
.otherwise(function(error) {
.catch(function(error) {
that._readyPromise.reject(error)
})
}

Carregando…
Cancelar
Salvar