Skip to content

Commit 6ff0328

Browse files
committed
解决挖方分析z为undefined的情况
1 parent ca9d6c5 commit 6ff0328

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • public/codes/3d/spatial-analysis/excavate

public/codes/3d/spatial-analysis/excavate/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,8 @@ drawTool.on("drawend", () => {
211211

212212
function getPickedCoordinate(coordinate) {
213213
const identifyData = groupGLLayer.identify(coordinate, { orderByCamera: true })[0];
214-
return (identifyData && identifyData.coordinate) || coordinate;
214+
coordinate.z = coordinate.z || 0;
215+
return (identifyData && identifyData.coordinate) || coordinate.toArray();
215216
}
216217

217218
function ExcavateAnalysis(coordinates, height, bottomTexture, sideTexture) {

0 commit comments

Comments
 (0)