|
|
@ -1,7 +1,9 @@
|
|
|
|
import { DynamicInputManage } from './DynamicInputManage';
|
|
|
|
import { DynamicInputManage } from './DynamicInputManage';
|
|
|
|
import { DynamicInput } from './DynamicInputBase';
|
|
|
|
import { DynamicInput } from './DynamicInputBase';
|
|
|
|
import { Vector3 } from "three";
|
|
|
|
import { Vector3 } from "three";
|
|
|
|
|
|
|
|
import { app } from '../../ApplicationServices/Application';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const MINUS_HEIGHT = 46;
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 动态输入的提示块, 包含了提示信息和后续的输入框.
|
|
|
|
* 动态输入的提示块, 包含了提示信息和后续的输入框.
|
|
|
|
*
|
|
|
|
*
|
|
|
@ -21,7 +23,7 @@ export class PromptBlock
|
|
|
|
this.dynamicInputManage = dynamicInputManage;
|
|
|
|
this.dynamicInputManage = dynamicInputManage;
|
|
|
|
//容器
|
|
|
|
//容器
|
|
|
|
this.promptContainer = document.createElement("div");
|
|
|
|
this.promptContainer = document.createElement("div");
|
|
|
|
this.promptContainer.style.position = "fixed";
|
|
|
|
this.promptContainer.style.position = "absolute";
|
|
|
|
this.promptContainer.style.fontSize = "15px";
|
|
|
|
this.promptContainer.style.fontSize = "15px";
|
|
|
|
//提示
|
|
|
|
//提示
|
|
|
|
this.promptEl = document.createElement('label');
|
|
|
|
this.promptEl = document.createElement('label');
|
|
|
@ -54,10 +56,14 @@ export class PromptBlock
|
|
|
|
if (this.dynamicInputManage.IsInputing) return;
|
|
|
|
if (this.dynamicInputManage.IsInputing) return;
|
|
|
|
//设置 promptEl 的位置.
|
|
|
|
//设置 promptEl 的位置.
|
|
|
|
let promptElX = mousePos.x + 20;
|
|
|
|
let promptElX = mousePos.x + 20;
|
|
|
|
let promptElY = mousePos.y + 90;
|
|
|
|
let promptElY = mousePos.y + 20;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (promptElY > app.m_Viewer.Height - MINUS_HEIGHT)
|
|
|
|
|
|
|
|
this.promptContainer.style.top = mousePos.y - 40 + "px";
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
this.promptContainer.style.top = promptElY + "px";
|
|
|
|
|
|
|
|
|
|
|
|
this.promptContainer.style.left = promptElX + "px";
|
|
|
|
this.promptContainer.style.left = promptElX + "px";
|
|
|
|
this.promptContainer.style.top = promptElY + "px";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.dynamicInputManage.Focus();
|
|
|
|
this.dynamicInputManage.Focus();
|
|
|
|
}
|
|
|
|
}
|
|
|
|