|
|
|
@ -39,6 +39,12 @@ import { WeatherTool } from "./weather-tool";
|
|
|
|
|
|
|
|
|
|
export class MarkWindow extends UIBase { |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 游离节点特殊Key |
|
|
|
|
*/ |
|
|
|
|
readonly c_leaveNode: string = "node_leave_"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static instance: MarkWindow; |
|
|
|
|
static s_cameraData: ArcRotateCameraData = null;//预定义的相机数据
|
|
|
|
|
static s_preLoadMesh: boolean = false;//预加载所有标绘物(如果是false,则在选中每个标绘物的时候,进行预加载单个)
|
|
|
|
@ -236,6 +242,7 @@ export class MarkWindow extends UIBase {
|
|
|
|
|
* 保存至已有节点 |
|
|
|
|
* @param markPlanId 方案id,一级节点ID |
|
|
|
|
* @param nodeId 节点id,二级节点id |
|
|
|
|
* @param newName 是否要覆盖原有的名字 |
|
|
|
|
*/ |
|
|
|
|
saveToOldNode(markPlanId: number, nodeId: number, newName?: string) { |
|
|
|
|
let markPlaneData = DataManager.allMarkPlanData.getMarkPlanById(markPlanId); |
|
|
|
@ -248,7 +255,7 @@ export class MarkWindow extends UIBase {
|
|
|
|
|
let copyNodeData = classToClass(this.currentMarkNodeDataCopy);//覆盖数据
|
|
|
|
|
copyNodeData.id = oldNodeData.id; |
|
|
|
|
copyNodeData.index = oldNodeData.index; |
|
|
|
|
if (newName != null) { |
|
|
|
|
if (newName != null && newName != this.c_leaveNode) { |
|
|
|
|
copyNodeData.name = newName; |
|
|
|
|
} |
|
|
|
|
// copyNodeData.name = oldNodeData.name;
|
|
|
|
@ -321,10 +328,10 @@ export class MarkWindow extends UIBase {
|
|
|
|
|
let nodeCopy: MarkNodeData; |
|
|
|
|
if (changeBuildingByUI) //从ui点击切层,
|
|
|
|
|
{ |
|
|
|
|
console.log(this.currentMarkNodeInfo); |
|
|
|
|
// console.log(this.currentMarkNodeInfo);
|
|
|
|
|
if (this.currentMarkNodeInfo == null)//没有当前的markInfo,创建一个游离的节点
|
|
|
|
|
{ |
|
|
|
|
console.log("拷贝游离节点"); |
|
|
|
|
// console.log("拷贝游离节点");
|
|
|
|
|
nodeCopy = this.createLeaveNode(); |
|
|
|
|
this.savCurrentNodeData(nodeCopy); |
|
|
|
|
} |
|
|
|
@ -363,8 +370,12 @@ export class MarkWindow extends UIBase {
|
|
|
|
|
this.currentMarkNodeInfo = new MarkNodeInfo(markPlanData, this.currentMarkNodeDataCopy); |
|
|
|
|
//this.currentMarkNodeDataCopy = classToClass(this.currentMarkNodeInfo.nodeData); //更新备份数据
|
|
|
|
|
this.updateNodeInfo(); |
|
|
|
|
if (readDescribe) { |
|
|
|
|
this.readDescribe(nodeCopy.describe); |
|
|
|
|
let instance = this; |
|
|
|
|
if (readDescribe) { //镜头移动完,开始说话
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
instance.readDescribe(nodeCopy.describe); |
|
|
|
|
}, MarkNodeData.speakWaitTime * 1000); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
@ -1009,7 +1020,7 @@ export class MarkWindow extends UIBase {
|
|
|
|
|
* 创建一个游离的节点,用于没有选中已经创建的节点时,存放标绘信息 |
|
|
|
|
*/ |
|
|
|
|
createLeaveNode() { |
|
|
|
|
let result = new MarkNodeData(0, "leave"); |
|
|
|
|
let result = new MarkNodeData(0, this.c_leaveNode); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|