|
|
|
@ -3,7 +3,6 @@ import { app } from '../../ApplicationServices/Application';
|
|
|
|
|
import { KeyBoard } from '../../Common/KeyEnum';
|
|
|
|
|
import { Singleton } from '../../Common/Singleton';
|
|
|
|
|
import { GetEntity } from '../../Common/Utils';
|
|
|
|
|
import { commandMachine } from '../../Editor/CommandMachine';
|
|
|
|
|
import { DownPanelStore } from '../../UI/Store/DownPanelStore';
|
|
|
|
|
import { FontLoader } from './FontLoader';
|
|
|
|
|
import { Text } from './Text';
|
|
|
|
@ -37,8 +36,6 @@ export class TextArea extends Singleton
|
|
|
|
|
}
|
|
|
|
|
StartDrawText(position: Vector3, height: number, rotate: number, str: string)
|
|
|
|
|
{
|
|
|
|
|
commandMachine.CommandStart("TextDraw");
|
|
|
|
|
|
|
|
|
|
document.getElementById('Webgl').parentNode.appendChild(this.m_AreaContiner);
|
|
|
|
|
this.RegisterEvent();
|
|
|
|
|
this.m_TextPosition = position;
|
|
|
|
@ -49,8 +46,6 @@ export class TextArea extends Singleton
|
|
|
|
|
}
|
|
|
|
|
StartEditorText(textObj)
|
|
|
|
|
{
|
|
|
|
|
commandMachine.CommandStart("EditText");
|
|
|
|
|
|
|
|
|
|
let text = GetEntity(textObj) as Text;
|
|
|
|
|
if (text)
|
|
|
|
|
{
|
|
|
|
@ -197,6 +192,17 @@ export class TextArea extends Singleton
|
|
|
|
|
|
|
|
|
|
app.m_Editor.UpdateScreen();
|
|
|
|
|
|
|
|
|
|
commandMachine.CommandEnd();
|
|
|
|
|
this.waitPromis.forEach(f => f());
|
|
|
|
|
this.waitPromis.length = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private waitPromis: Function[] = [];
|
|
|
|
|
async Wait()
|
|
|
|
|
{
|
|
|
|
|
let promis = new Promise((res, rej) =>
|
|
|
|
|
{
|
|
|
|
|
this.waitPromis.push(res);
|
|
|
|
|
});
|
|
|
|
|
return promis;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|