Procházet zdrojové kódy

Merge pull request #145 from zishang520/patch-2

Fix: Getting unusual heights when drawing and editing polygons
tags/3.0.0
Caven Chen před 2 roky
rodič
revize
9778f5bb7f
Žádný účet není propojen s e-mailovou adresou tvůrce revize

+ 3
- 1
modules/plot/draw/DrawPolygon.js Zobrazit soubor

@@ -34,7 +34,9 @@ class DrawPolygon extends Draw {
...this._style,
hierarchy: new Cesium.CallbackProperty(() => {
if (this._positions.length > 2) {
return new Cesium.PolygonHierarchy(this._positions)
return new Cesium.PolygonHierarchy(
this._positions.map(item => item.clone())
)
} else {
return null
}

+ 3
- 1
modules/plot/edit/EditPolygon.js Zobrazit soubor

@@ -21,7 +21,9 @@ class EditPolygon extends Edit {
_mountedHook() {
this._delegate.polygon.hierarchy = new Cesium.CallbackProperty(time => {
if (this._positions.length > 2) {
return new Cesium.PolygonHierarchy(this._positions)
return new Cesium.PolygonHierarchy(
this._positions.map(item => item.clone())
)
} else {
return null
}

Načítá se…
Zrušit
Uložit