|
|
@ -141,8 +141,9 @@ export class ModelInfo_mark extends ModelInfo { |
|
|
|
this.uiFollowHead = Button.CreateSimpleButton('followHead_' + this.key, ""); |
|
|
|
this.uiFollowHead = Button.CreateSimpleButton('followHead_' + this.key, ""); |
|
|
|
UIManager.Instance.uiRoot.addControl(this.uiFollowHead); |
|
|
|
UIManager.Instance.uiRoot.addControl(this.uiFollowHead); |
|
|
|
this.uiFollowHead.width = this.c_uiDefaultWidth + "px"; |
|
|
|
this.uiFollowHead.width = this.c_uiDefaultWidth + "px"; |
|
|
|
this.uiFollowHead.height = "50px"; |
|
|
|
this.uiFollowHead.height = "55px"; |
|
|
|
this.uiFollowHead.thickness = 0; |
|
|
|
this.uiFollowHead.thickness = 0; |
|
|
|
|
|
|
|
this.uiFollowHead.adaptWidthToChildren = true; |
|
|
|
this.uiFollowHead.linkWithMesh(this.headMesh); |
|
|
|
this.uiFollowHead.linkWithMesh(this.headMesh); |
|
|
|
this.uiFollowHead.onPointerClickObservable.add(() => { |
|
|
|
this.uiFollowHead.onPointerClickObservable.add(() => { |
|
|
|
MarkWindow.instance.selectMarkDataFrom3d(instance, true); |
|
|
|
MarkWindow.instance.selectMarkDataFrom3d(instance, true); |
|
|
@ -161,6 +162,9 @@ export class ModelInfo_mark extends ModelInfo { |
|
|
|
this.uiFollowHead.addControl(this.uiNumber); |
|
|
|
this.uiFollowHead.addControl(this.uiNumber); |
|
|
|
this.uiNumber.width = 1; |
|
|
|
this.uiNumber.width = 1; |
|
|
|
this.uiNumber.height = 0.5; |
|
|
|
this.uiNumber.height = 0.5; |
|
|
|
|
|
|
|
this.uiNumber.paddingTopInPixels = 5; |
|
|
|
|
|
|
|
this.uiNumber.paddingLeft = 5; |
|
|
|
|
|
|
|
this.uiNumber.paddingRight = 5; |
|
|
|
this.uiNumber.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP; |
|
|
|
this.uiNumber.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP; |
|
|
|
this.uiNumber.color = "white"; |
|
|
|
this.uiNumber.color = "white"; |
|
|
|
this.uiNumber.shadowBlur = 2; |
|
|
|
this.uiNumber.shadowBlur = 2; |
|
|
@ -171,6 +175,9 @@ export class ModelInfo_mark extends ModelInfo { |
|
|
|
this.uiFollowHead.addControl(this.uiTask); |
|
|
|
this.uiFollowHead.addControl(this.uiTask); |
|
|
|
this.uiTask.width = 1; |
|
|
|
this.uiTask.width = 1; |
|
|
|
this.uiTask.height = 0.5; |
|
|
|
this.uiTask.height = 0.5; |
|
|
|
|
|
|
|
this.uiTask.paddingBottomInPixels = 2; |
|
|
|
|
|
|
|
this.uiTask.paddingLeft = 5; |
|
|
|
|
|
|
|
this.uiTask.paddingRight = 5; |
|
|
|
this.uiTask.verticalAlignment = Control.VERTICAL_ALIGNMENT_BOTTOM |
|
|
|
this.uiTask.verticalAlignment = Control.VERTICAL_ALIGNMENT_BOTTOM |
|
|
|
this.uiTask.color = BabylonUIStyleTool.c_color_3d_blue; |
|
|
|
this.uiTask.color = BabylonUIStyleTool.c_color_3d_blue; |
|
|
|
this.uiTask.shadowBlur = 1; |
|
|
|
this.uiTask.shadowBlur = 1; |
|
|
@ -178,6 +185,7 @@ export class ModelInfo_mark extends ModelInfo { |
|
|
|
this.uiTask.resizeToFit = true; |
|
|
|
this.uiTask.resizeToFit = true; |
|
|
|
|
|
|
|
|
|
|
|
this.updateProperty(); |
|
|
|
this.updateProperty(); |
|
|
|
|
|
|
|
// this.uiFollowHead.linkWithMesh(this.headMesh);
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -207,12 +215,13 @@ export class ModelInfo_mark extends ModelInfo { |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
else { |
|
|
|
//this.pointerDragBehavior.enabled = true;
|
|
|
|
this.pointerDragBehavior.enabled = true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//特效类、灭火器类,要出现坐标轴
|
|
|
|
//特效类、灭火器类、文字标注,要出现坐标轴
|
|
|
|
if (this.markData.markKindType == MarkKindType.Effect |
|
|
|
if (this.markData.markKindType == MarkKindType.Effect |
|
|
|
|| TsTool.stringContain(this.markData.type, "MHQ")) { |
|
|
|
|| TsTool.stringContain(this.markData.type, "MHQ") |
|
|
|
|
|
|
|
|| this.markData.type == MarkType.WZ) { |
|
|
|
GizmoTool.onPickMeshInfoObservable.notifyObservers(this); |
|
|
|
GizmoTool.onPickMeshInfoObservable.notifyObservers(this); |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
else { |
|
|
@ -227,7 +236,7 @@ export class ModelInfo_mark extends ModelInfo { |
|
|
|
//GizmoTool.onPickMeshInfoObservable.notifyObservers(null);
|
|
|
|
//GizmoTool.onPickMeshInfoObservable.notifyObservers(null);
|
|
|
|
SceneManager.Instance.removeFromHighLight(this.modelBox as Mesh) |
|
|
|
SceneManager.Instance.removeFromHighLight(this.modelBox as Mesh) |
|
|
|
if (this.pointerDragBehavior != null) { |
|
|
|
if (this.pointerDragBehavior != null) { |
|
|
|
//this.pointerDragBehavior.enabled = false; //停止拖拽
|
|
|
|
this.pointerDragBehavior.enabled = false; //停止拖拽
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -253,18 +262,18 @@ export class ModelInfo_mark extends ModelInfo { |
|
|
|
if (this.markData.property.taskType != MarkTask.None) { |
|
|
|
if (this.markData.property.taskType != MarkTask.None) { |
|
|
|
this.uiNumber.text = this.markData.property.getInstitutionNum(); |
|
|
|
this.uiNumber.text = this.markData.property.getInstitutionNum(); |
|
|
|
this.uiTask.text = this.markData.property.task; |
|
|
|
this.uiTask.text = this.markData.property.task; |
|
|
|
|
|
|
|
this.uiNumber |
|
|
|
let instance = this; |
|
|
|
let instance = this; |
|
|
|
setTimeout(() => { |
|
|
|
// setTimeout(() => {
|
|
|
|
if (instance.uiNumber == null) { |
|
|
|
// if (instance.uiNumber == null) {
|
|
|
|
return; |
|
|
|
// return;
|
|
|
|
} |
|
|
|
// }
|
|
|
|
let numWidth = instance.uiNumber.widthInPixels; |
|
|
|
// let numWidth = instance.uiNumber.widthInPixels;
|
|
|
|
let taskWidth = instance.uiTask.widthInPixels; |
|
|
|
// let taskWidth = instance.uiTask.widthInPixels;
|
|
|
|
let maxWidth = Math.max(numWidth, taskWidth, this.c_uiDefaultWidth); |
|
|
|
// let maxWidth = Math.max(numWidth, taskWidth, this.c_uiDefaultWidth);
|
|
|
|
instance.uiFollowHead.widthInPixels = maxWidth; |
|
|
|
// instance.uiFollowHead.widthInPixels = maxWidth;
|
|
|
|
// instance.uiFollowHeadBg.widthInPixels = maxWidth;
|
|
|
|
// // instance.uiFollowHeadBg.widthInPixels = maxWidth;
|
|
|
|
}, (50)); |
|
|
|
// }, (100));
|
|
|
|
|
|
|
|
|
|
|
|
// console.log("喷水", this.taskNeedWaterParticle());
|
|
|
|
// console.log("喷水", this.taskNeedWaterParticle());
|
|
|
|
if (this.taskNeedWaterParticle()) { |
|
|
|
if (this.taskNeedWaterParticle()) { |
|
|
|