Pārlūkot izejas kodu

fix: 修复 vue 使用 proxy 代理时找不到对象的BUG

tags/3.1.0
shenweiqun pirms 2 gadiem
vecāks
revīzija
67fc46e98a

+ 4
- 2
src/modules/widget/type/Compass.js Parādīt failu

@@ -38,9 +38,11 @@ class Compass extends Widget {
* @private
*/
_installHook() {
const self = this
Object.defineProperty(this._viewer, 'compass', {
value: this,
writable: false,
get() {
return self
},
})
this._wrapper.onmousedown = (e) => {
this._handleMouseDown(e)

+ 4
- 2
src/modules/widget/type/ContextMenu.js Parādīt failu

@@ -59,9 +59,11 @@ class ContextMenu extends Widget {
* @private
*/
_installHook() {
const self = this
Object.defineProperty(this._viewer, 'contextMenu', {
value: this,
writable: false,
get() {
return self
},
})
this._handler = new Cesium.ScreenSpaceEventHandler(this._viewer.canvas)
}

+ 4
- 2
src/modules/widget/type/DistanceLegend.js Parādīt failu

@@ -41,9 +41,11 @@ class DistanceLegend extends Widget {
* @private
*/
_installHook() {
const self = this
Object.defineProperty(this._viewer, 'distanceLegend', {
value: this,
writable: false,
get() {
return self
},
})
}


+ 4
- 2
src/modules/widget/type/HawkeyeMap.js Parādīt failu

@@ -64,9 +64,11 @@ class HawkeyeMap extends Widget {
* @private
*/
_installHook() {
const self = this
Object.defineProperty(this._viewer, 'hawkeyeMap', {
value: this,
writable: false,
get() {
return self
},
})
this._viewer.camera.percentageChanged = 0.01
}

+ 4
- 2
src/modules/widget/type/LoadingMask.js Parādīt failu

@@ -22,9 +22,11 @@ class LoadingMask extends Widget {
* @private
*/
_installHook() {
const self = this
Object.defineProperty(this._viewer, 'loadingMask', {
value: this,
writable: false,
get() {
return self
},
})
}


+ 4
- 2
src/modules/widget/type/LocationBar.js Parādīt failu

@@ -34,9 +34,11 @@ class LocationBar extends Widget {
* @private
*/
_installHook() {
const self = this
Object.defineProperty(this._viewer, 'locationBar', {
value: this,
writable: false,
get() {
return self
},
})
}


+ 4
- 2
src/modules/widget/type/MapSplit.js Parādīt failu

@@ -26,9 +26,11 @@ class MapSplit extends Widget {
* @private
*/
_installHook() {
const self = this
Object.defineProperty(this._viewer, 'mapSplit', {
value: this,
writable: false,
get() {
return self
},
})
}


+ 5
- 3
src/modules/widget/type/MapSwitch.js Parādīt failu

@@ -34,12 +34,14 @@ class MapSwitch extends Widget {
* @private
*/
_installHook() {
const self = this
Object.defineProperty(this._viewer, 'mapSwitch', {
value: this,
writable: false,
get() {
return self
},
})
this.enable = true
let self = this
// let self = this
this._wrapper.onmouseover = () => {
let width = 80
let rightMargin = 5

+ 4
- 2
src/modules/widget/type/Popup.js Parādīt failu

@@ -65,9 +65,11 @@ class Popup extends Widget {
_installHook() {
this.enable = true
this._bindEvent()
const self = this
Object.defineProperty(this._viewer, 'popup', {
value: this,
writable: false,
get() {
return self
},
})
}


+ 4
- 2
src/modules/widget/type/SceneSplit.js Parādīt failu

@@ -27,9 +27,11 @@ class SceneSplit extends Widget {
* @private
*/
_installHook() {
const self = this
Object.defineProperty(this._viewer, 'sceneSplit', {
value: this,
writable: false,
get() {
return self
},
})
}


+ 4
- 2
src/modules/widget/type/TilesetSplit.js Parādīt failu

@@ -26,9 +26,11 @@ class TilesetSplit extends Widget {
* @private
*/
_installHook() {
const self = this
Object.defineProperty(this._viewer, 'tilesetSplit', {
value: this,
writable: false,
get() {
return self
},
})
}


+ 4
- 2
src/modules/widget/type/Tooltip.js Parādīt failu

@@ -23,9 +23,11 @@ class Tooltip extends Widget {
* @private
*/
_installHook() {
const self = this
Object.defineProperty(this._viewer, 'tooltip', {
value: this,
writable: false,
get() {
return self
},
})
}


+ 4
- 2
src/modules/widget/type/ZoomController.js Parādīt failu

@@ -154,9 +154,11 @@ class ZoomController extends Widget {
* @private
*/
_installHook() {
const self = this
Object.defineProperty(this._viewer, 'zoomController', {
value: this,
writable: false,
get() {
return self
},
})
}


Notiek ielāde…
Atcelt
Saglabāt