将url中localhost端口改为当前host端口
This commit is contained in:
@ -145,15 +145,7 @@ class Model extends BaseModel {
|
||||
if (!this.sdk || !this.sdk.viewer || !this.sdk.viewer.scene) {
|
||||
return
|
||||
}
|
||||
if (!url.startsWith("http")) {
|
||||
//说明是本地的json,在磁盘中存在的
|
||||
if (!url.includes(":")) {
|
||||
if (this.options.host) {
|
||||
let o = new URL(url, this.options.host)
|
||||
url = o.href
|
||||
}
|
||||
}
|
||||
}
|
||||
url = this.replaceHost(url, this.options.host)
|
||||
// this.handler = new Cesium.ScreenSpaceEventHandler(
|
||||
// this.sdk.viewer.canvas
|
||||
// )
|
||||
@ -1336,7 +1328,9 @@ class Model extends BaseModel {
|
||||
this.name = this.options.name || '未命名对象'
|
||||
this.originalOptions = this.deepCopyObj(this.options)
|
||||
this._DialogObject.close()
|
||||
this.Dialog.confirmCallBack && this.Dialog.confirmCallBack(this.originalOptions)
|
||||
let cdoptions = this.deepCopyObj(this.options)
|
||||
cdoptions.host = ''
|
||||
this.Dialog.confirmCallBack && this.Dialog.confirmCallBack(cdoptions)
|
||||
syncData(this.sdk, this.options.id)
|
||||
syncSplitData(this.sdk, this.options.id)
|
||||
},
|
||||
|
@ -247,7 +247,9 @@ class BaseTerrain extends BaseSource {
|
||||
}
|
||||
this.originalOptions = this.deepCopyObj(this.options)
|
||||
this._DialogObject.close()
|
||||
this.Dialog.confirmCallBack && this.Dialog.confirmCallBack(this.originalOptions)
|
||||
let cdoptions = this.deepCopyObj(this.options)
|
||||
cdoptions.host = ''
|
||||
this.Dialog.confirmCallBack && this.Dialog.confirmCallBack(cdoptions)
|
||||
},
|
||||
// resetCallBack: () => {
|
||||
// this.name = this.originalOptions.name
|
||||
|
Reference in New Issue
Block a user