mirror of https://gitee.com/cf-fz/WebCAD.git
parent
b7fed7ac76
commit
2c2087e201
@ -0,0 +1,22 @@
|
|||||||
|
import { app } from "../../ApplicationServices/Application";
|
||||||
|
import { arrayRemoveIf } from "../../Common/ArrayExt";
|
||||||
|
import { Light } from "../../DatabaseServices/Lights/Light";
|
||||||
|
import { Command } from "../../Editor/CommandMachine";
|
||||||
|
|
||||||
|
|
||||||
|
export class Command_UpdateLight implements Command
|
||||||
|
{
|
||||||
|
async exec()
|
||||||
|
{
|
||||||
|
arrayRemoveIf(app.Database.ModelSpace.EntityCol.Objects, ent =>
|
||||||
|
{
|
||||||
|
if (ent instanceof Light)
|
||||||
|
{
|
||||||
|
app.Database.Lights.EntityCol.Objects.push(ent);
|
||||||
|
ent.Owner = app.Database.Lights.Id;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue