陈鹏飞 3 years ago
parent
commit
62c1f6bb6b
  1. 32
      src/app/babylon/model/info/mark/model-info-mark.ts
  2. 4
      src/app/babylon/view/mark-window/mark-window.ts

32
src/app/babylon/model/info/mark/model-info-mark.ts

@ -141,8 +141,9 @@ export class ModelInfo_mark extends ModelInfo {
this.uiFollowHead = Button.CreateSimpleButton('followHead_' + this.key, "");
UIManager.Instance.uiRoot.addControl(this.uiFollowHead);
this.uiFollowHead.width = this.c_uiDefaultWidth + "px";
this.uiFollowHead.height = "50px";
this.uiFollowHead.height = "55px";
this.uiFollowHead.thickness = 0;
this.uiFollowHead.adaptWidthToChildren = true;
this.uiFollowHead.linkWithMesh(this.headMesh);
this.uiFollowHead.onPointerClickObservable.add(() => {
MarkWindow.instance.selectMarkDataFrom3d(instance, true);
@ -161,6 +162,9 @@ export class ModelInfo_mark extends ModelInfo {
this.uiFollowHead.addControl(this.uiNumber);
this.uiNumber.width = 1;
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.color = "white";
this.uiNumber.shadowBlur = 2;
@ -171,6 +175,9 @@ export class ModelInfo_mark extends ModelInfo {
this.uiFollowHead.addControl(this.uiTask);
this.uiTask.width = 1;
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.color = BabylonUIStyleTool.c_color_3d_blue;
this.uiTask.shadowBlur = 1;
@ -178,6 +185,7 @@ export class ModelInfo_mark extends ModelInfo {
this.uiTask.resizeToFit = true;
this.updateProperty();
// this.uiFollowHead.linkWithMesh(this.headMesh);
}
@ -254,18 +262,18 @@ export class ModelInfo_mark extends ModelInfo {
if (this.markData.property.taskType != MarkTask.None) {
this.uiNumber.text = this.markData.property.getInstitutionNum();
this.uiTask.text = this.markData.property.task;
this.uiNumber
let instance = this;
setTimeout(() => {
if (instance.uiNumber == null) {
return;
}
let numWidth = instance.uiNumber.widthInPixels;
let taskWidth = instance.uiTask.widthInPixels;
let maxWidth = Math.max(numWidth, taskWidth, this.c_uiDefaultWidth);
instance.uiFollowHead.widthInPixels = maxWidth;
// instance.uiFollowHeadBg.widthInPixels = maxWidth;
}, (100));
// setTimeout(() => {
// if (instance.uiNumber == null) {
// return;
// }
// let numWidth = instance.uiNumber.widthInPixels;
// let taskWidth = instance.uiTask.widthInPixels;
// let maxWidth = Math.max(numWidth, taskWidth, this.c_uiDefaultWidth);
// instance.uiFollowHead.widthInPixels = maxWidth;
// // instance.uiFollowHeadBg.widthInPixels = maxWidth;
// }, (100));
// console.log("喷水", this.taskNeedWaterParticle());
if (this.taskNeedWaterParticle()) {

4
src/app/babylon/view/mark-window/mark-window.ts

@ -7,9 +7,9 @@ import { DataManager } from "../../controller/data-manager";
import { EventManager } from "../../controller/event-manager/event-manager";
import { Event_GetAllMarkPlanData } from "../../controller/event-manager/events/event-get-markplandata-success";
import { Event_KeyboardInput } from "../../controller/event-manager/events/event-keyboard-input";
import { Event_LoadingChange } from "../../controller/event-manager/events/event-loading-change";
import { Event_MarkInfoChange, MarkInfoChangeType } from "../../controller/event-manager/events/event-mark-info-change";
import { InputController } from "../../controller/inputController";
import { ModeManager, ModeType } from "../../controller/mode-manager";
import { SceneManager } from "../../controller/scene-manager";
import { BuildingStatus } from "../../controller/status/building-status";
import { IndoorStatus } from "../../controller/status/indoor-status";
@ -799,7 +799,7 @@ export class MarkWindow extends UIBase {
onPointerObservable(eventData: PointerInfo, eventState: EventState) {
let instance = MarkWindow.instance;
if (!instance.isShow) {
if (!instance.isShow || ModeManager.currentMode != ModeType.Edit) { //查看模式不能调整预案
return;
}

Loading…
Cancel
Save