|
|
|
@ -68,9 +68,6 @@ export class DownPanelStore
|
|
|
|
|
|
|
|
|
|
@observable progressName = "";
|
|
|
|
|
@observable progress = 1;
|
|
|
|
|
@observable isLeftToolBarShow: boolean = true;
|
|
|
|
|
@observable isTopToolBarShow: boolean = true;
|
|
|
|
|
@observable isBottomToolBarShow: boolean = true;
|
|
|
|
|
@observable isF3Checked: boolean = true;//捕捉开启
|
|
|
|
|
@observable isF11Checked: boolean = false;
|
|
|
|
|
posEl: HTMLSpanElement;
|
|
|
|
@ -157,9 +154,22 @@ export class DownPanelStore
|
|
|
|
|
|
|
|
|
|
@observable useAxis: boolean = true;
|
|
|
|
|
|
|
|
|
|
@observable isSmallScreen: boolean;
|
|
|
|
|
@observable isLeftToolBarShow: boolean = true;//
|
|
|
|
|
@observable isTopToolBarShow: boolean = true;
|
|
|
|
|
@observable isBottomToolBarShow: boolean = true;
|
|
|
|
|
//新增另一组配置用来控制在不同屏幕大小设备下的显示隐藏 (小屏模式下用以下配置)
|
|
|
|
|
@observable isLeftToolBarShowMin: boolean = false;
|
|
|
|
|
@observable isTopToolBarShowMin: boolean = false;//
|
|
|
|
|
@observable isBottomToolBarShowMin: boolean = false;
|
|
|
|
|
private timeId;
|
|
|
|
|
private constructor()
|
|
|
|
|
{
|
|
|
|
|
//设置刚开始打开时屏幕状态,以这个为基准判断
|
|
|
|
|
this.isSmallScreen = Boolean(window.innerWidth < 850);
|
|
|
|
|
if (this.isSmallScreen)//只能从小屏变成大屏,不能从大屏变成小屏
|
|
|
|
|
window.addEventListener('resize', this.OnWindowsResize);
|
|
|
|
|
|
|
|
|
|
xaop.begin(app.Editor.MouseCtrl, app.Editor.MouseCtrl.updateWordPoint, () =>
|
|
|
|
|
{
|
|
|
|
|
this.posEl.innerText = PointToString(app.Editor.MouseCtrl._CurMousePointWCS);
|
|
|
|
@ -184,6 +194,17 @@ export class DownPanelStore
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private OnWindowsResize = () =>
|
|
|
|
|
{
|
|
|
|
|
if (this.isSmallScreen && window.innerWidth >= 850)
|
|
|
|
|
{
|
|
|
|
|
this.isSmallScreen = false;
|
|
|
|
|
if (this.isLeftToolBarShowMin !== this.isLeftToolBarShow)
|
|
|
|
|
this.showType ^= ToolBarType.lefttoolbar;
|
|
|
|
|
window.removeEventListener("resize", this.OnWindowsResize);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
private static _SingleInstance: DownPanelStore;
|
|
|
|
|
static GetInstance(): DownPanelStore
|
|
|
|
|
{
|
|
|
|
@ -202,6 +223,9 @@ export class DownPanelStore
|
|
|
|
|
isLeftToolBarShow: this.isLeftToolBarShow,
|
|
|
|
|
isTopToolBarShow: this.isTopToolBarShow,
|
|
|
|
|
isBottomToolBarShow: this.isBottomToolBarShow,
|
|
|
|
|
isLeftToolBarShowMin: this.isLeftToolBarShowMin,
|
|
|
|
|
isTopToolBarShowMin: this.isTopToolBarShowMin,
|
|
|
|
|
isBottomToolBarShowMin: this.isBottomToolBarShowMin,
|
|
|
|
|
isF3Checked: this.isF3Checked,
|
|
|
|
|
isF11Checked: this.isF11Checked,
|
|
|
|
|
snapData: this.snapData.map(d => d.enable),
|
|
|
|
@ -264,11 +288,13 @@ export class DownPanelStore
|
|
|
|
|
this.usePass = config.usePass;
|
|
|
|
|
this.useOrtho = config.useOrtho;
|
|
|
|
|
|
|
|
|
|
let isshow: boolean;
|
|
|
|
|
if (window.innerWidth < 850) isshow = false;
|
|
|
|
|
this.isLeftToolBarShow = isshow ?? config.isLeftToolBarShow ?? true;
|
|
|
|
|
this.isTopToolBarShow = isshow ?? config.isTopToolBarShow ?? true;
|
|
|
|
|
this.isBottomToolBarShow = isshow ?? config.isBottomToolBarShow ?? true;
|
|
|
|
|
this.isLeftToolBarShow = config.isLeftToolBarShow ?? true;
|
|
|
|
|
this.isTopToolBarShow = config.isTopToolBarShow ?? true;
|
|
|
|
|
this.isBottomToolBarShow = config.isBottomToolBarShow ?? true;
|
|
|
|
|
|
|
|
|
|
this.isLeftToolBarShowMin = config.isLeftToolBarShowMin ?? false;
|
|
|
|
|
this.isTopToolBarShowMin = config.isTopToolBarShowMin ?? false;
|
|
|
|
|
this.isBottomToolBarShowMin = config.isBottomToolBarShowMin ?? false;
|
|
|
|
|
|
|
|
|
|
this.isF3Checked = config.isF3Checked;
|
|
|
|
|
this.isF11Checked = config.isF11Checked;
|
|
|
|
@ -284,13 +310,16 @@ export class DownPanelStore
|
|
|
|
|
this.lightsData[i].enable = config.lightsData[i];
|
|
|
|
|
}
|
|
|
|
|
this.SetSnapMode();
|
|
|
|
|
this.showType = !this.isLeftToolBarShow ? this.showType ^ ToolBarType.lefttoolbar : this.showType | ToolBarType.lefttoolbar;
|
|
|
|
|
this.showType = (this.isSmallScreen ? !this.isLeftToolBarShowMin : !this.isLeftToolBarShow) ? this.showType ^ ToolBarType.lefttoolbar : this.showType | ToolBarType.lefttoolbar;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
toggleLeftToolBarShow()
|
|
|
|
|
{
|
|
|
|
|
this.showType ^= ToolBarType.lefttoolbar;
|
|
|
|
|
this.isLeftToolBarShow = !this.isLeftToolBarShow;
|
|
|
|
|
if (this.isSmallScreen)
|
|
|
|
|
this.isLeftToolBarShowMin = !this.isLeftToolBarShowMin;
|
|
|
|
|
else
|
|
|
|
|
this.isLeftToolBarShow = !this.isLeftToolBarShow;
|
|
|
|
|
this.Upload();
|
|
|
|
|
}
|
|
|
|
|
toggleTopToolBarShow()
|
|
|
|
@ -299,7 +328,10 @@ export class DownPanelStore
|
|
|
|
|
}
|
|
|
|
|
toggleBottomToolBarShow()
|
|
|
|
|
{
|
|
|
|
|
this.isBottomToolBarShow = !this.isBottomToolBarShow;
|
|
|
|
|
if (this.isSmallScreen)
|
|
|
|
|
this.isBottomToolBarShowMin = !this.isBottomToolBarShowMin;
|
|
|
|
|
else
|
|
|
|
|
this.isBottomToolBarShow = !this.isBottomToolBarShow;
|
|
|
|
|
this.Upload();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|