diff --git a/package.json b/package.json index bdebe94..8bc2e9f 100644 --- a/package.json +++ b/package.json @@ -80,4 +80,4 @@ "tslint": "~5.15.0", "typescript": "~3.7.5" } -} +} \ No newline at end of file diff --git a/src/app/babylon/controller/mode-manager.ts b/src/app/babylon/controller/mode-manager.ts index 146f793..49ab662 100644 --- a/src/app/babylon/controller/mode-manager.ts +++ b/src/app/babylon/controller/mode-manager.ts @@ -23,7 +23,7 @@ export class ModeManager { /** * 制作模式代表内部编辑人员,可新增单位、上传模型,查看模式代表交付的模式 */ - public static s_isMakeMode = false; + public static s_isMakeMode = true; /** * 调试模式 diff --git a/src/app/babylon/controller/scene-manager.ts b/src/app/babylon/controller/scene-manager.ts index b78552e..c488456 100644 --- a/src/app/babylon/controller/scene-manager.ts +++ b/src/app/babylon/controller/scene-manager.ts @@ -431,7 +431,7 @@ export class SceneManager { if (ev.altKey && ev.key == 'd' && ModeManager.isDebug) { SceneManager.showDebug = !SceneManager.showDebug; if (SceneManager.showDebug) { - SceneManager.Instance.scene.debugLayer.show(); + SceneManager.Instance.scene.debugLayer.show({ embedMode: true }); } else { SceneManager.Instance.scene.debugLayer.hide(); } diff --git a/src/app/babylon/tool/babylon-tool.ts b/src/app/babylon/tool/babylon-tool.ts index 6f49c77..f5b43c5 100644 --- a/src/app/babylon/tool/babylon-tool.ts +++ b/src/app/babylon/tool/babylon-tool.ts @@ -433,7 +433,7 @@ export class BabylonTool { public static limitPI(value: number) { let result = value; - while (result < 0) { + while (result < - Math.PI) { result += Math.PI * 2; } diff --git a/src/app/babylon/view/mark-window/mark-window.ts b/src/app/babylon/view/mark-window/mark-window.ts index cc3e42a..f670dd4 100644 --- a/src/app/babylon/view/mark-window/mark-window.ts +++ b/src/app/babylon/view/mark-window/mark-window.ts @@ -40,9 +40,9 @@ import { WeatherTool } from "./weather-tool"; export class MarkWindow extends UIBase { /** - * 游离节点特殊Key + * 游离节点特殊名称 */ - readonly c_leaveNode: string = "node_leave_"; + readonly c_leaveNodeName: string = ""; static instance: MarkWindow; @@ -255,10 +255,16 @@ export class MarkWindow extends UIBase { let copyNodeData = classToClass(this.currentMarkNodeDataCopy);//覆盖数据 copyNodeData.id = oldNodeData.id; copyNodeData.index = oldNodeData.index; - if (newName != null && newName != this.c_leaveNode) { + if (newName != null && newName != this.c_leaveNodeName) { copyNodeData.name = newName; } - // copyNodeData.name = oldNodeData.name; + if (copyNodeData.name == this.c_leaveNodeName) //如果来自空节点,则保留原名 + { + copyNodeData.name = oldNodeData.name; + } + + console.log("记录的数据", copyNodeData.texture, this.currentMarkNodeInfo.nodeData.texture); + markPlaneData.setNodeData(nodeId, copyNodeData);//覆盖数据 this.saveAllMarkPlanData(); @@ -368,8 +374,10 @@ export class MarkWindow extends UIBase { //清空 this.currentMarkNodeDataCopy = nodeCopy;//更新备份数据 this.currentMarkNodeInfo = new MarkNodeInfo(markPlanData, this.currentMarkNodeDataCopy); + //this.currentMarkNodeDataCopy = classToClass(this.currentMarkNodeInfo.nodeData); //更新备份数据 this.updateNodeInfo(readDescribe); + PlanComponent.instance.updateBeforePlanNode(); // let instance = this; // if (readDescribe) { //镜头移动完,开始说话 // setTimeout(() => { @@ -1022,7 +1030,7 @@ export class MarkWindow extends UIBase { * 创建一个游离的节点,用于没有选中已经创建的节点时,存放标绘信息 */ createLeaveNode() { - let result = new MarkNodeData(0, this.c_leaveNode); + let result = new MarkNodeData(0, this.c_leaveNodeName); return result; } diff --git a/src/app/pages/left-domain/left-domain.component.html b/src/app/pages/left-domain/left-domain.component.html index 07cb815..bdded79 100644 --- a/src/app/pages/left-domain/left-domain.component.html +++ b/src/app/pages/left-domain/left-domain.component.html @@ -47,11 +47,7 @@