|
|
|
@ -4,6 +4,8 @@ import { CommandNames } from "../Common/CommandNames";
|
|
|
|
|
import { CommandHistoryRecord } from "../DatabaseServices/CommandHistoryRecord";
|
|
|
|
|
import { LayerTableRecord } from "../DatabaseServices/LayerTableRecord";
|
|
|
|
|
import { LayerTable } from "../DatabaseServices/Tables/LayerTable";
|
|
|
|
|
import { ViewportEntity } from "../DatabaseServices/ViewportEntity";
|
|
|
|
|
import { UpdateLayerByViewPoint } from "../UI/Components/ToolBar/Layer/LayerCMD";
|
|
|
|
|
import { LayerTopStore } from "../UI/Components/ToolBar/Layer/LayerPanel";
|
|
|
|
|
import { LayerStore } from "../UI/Components/ToolBar/Layer/State/Store";
|
|
|
|
|
import { DataToViewForLayer } from "../UI/Components/ToolBar/Layer/State/Transform";
|
|
|
|
@ -20,15 +22,21 @@ export class LayerReactor
|
|
|
|
|
return (cmdName: string, historyRec: CommandHistoryRecord) =>
|
|
|
|
|
{
|
|
|
|
|
if (!app.Database.LayerTable || !app.Database.LayerTable.Current) return;
|
|
|
|
|
// 图层UI随图层表更新
|
|
|
|
|
for (const [k, v] of historyRec.HistoryList)
|
|
|
|
|
{
|
|
|
|
|
const o = k.Object;
|
|
|
|
|
// 图层UI随图层表更新
|
|
|
|
|
if (o instanceof LayerTableRecord || o instanceof LayerTable)
|
|
|
|
|
{
|
|
|
|
|
DataToViewForLayer.UpdateAll();
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
// 更新视口冻结的UI
|
|
|
|
|
else if (o instanceof ViewportEntity)
|
|
|
|
|
{
|
|
|
|
|
if (app.Viewer.CurrentViewport)
|
|
|
|
|
UpdateLayerByViewPoint(app.Viewer.CurrentViewport);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|