diff --git a/source/Localization/EN-US.ts b/source/Localization/EN-US.ts
index 875e29f..d28b7f9 100644
--- a/source/Localization/EN-US.ts
+++ b/source/Localization/EN-US.ts
@@ -112,5 +112,6 @@ const EN_US = {
"Panel.Info.Label.Details.Error.Unspecified": "Label object not specified",
"Panel.Info.Label.List.Error.Nodata": "There are no labels in the model, click the button to create",
"Panel.Info.Behavior.Details.Error.Not.Behavior": "Please specify a behavior first to view the details",
+ "Panel.Info.Behavior.Details.Behavior.Props": "{behavior} parameter",
}
export default EN_US;
\ No newline at end of file
diff --git a/source/Localization/ZH-CN.ts b/source/Localization/ZH-CN.ts
index b527afd..c28978a 100644
--- a/source/Localization/ZH-CN.ts
+++ b/source/Localization/ZH-CN.ts
@@ -112,5 +112,6 @@ const ZH_CN = {
"Panel.Info.Label.Details.Error.Unspecified": "未指定标签对象",
"Panel.Info.Label.List.Error.Nodata": "模型中没有标签,点击按钮以创建",
"Panel.Info.Behavior.Details.Error.Not.Behavior": "请先指定一个行为以查看详情",
+ "Panel.Info.Behavior.Details.Behavior.Props": "{behavior}参数",
}
export default ZH_CN;
\ No newline at end of file
diff --git a/source/Panel/BehaviorDetails/BehaviorDetails.tsx b/source/Panel/BehaviorDetails/BehaviorDetails.tsx
index 56f7d24..9bfcbde 100644
--- a/source/Panel/BehaviorDetails/BehaviorDetails.tsx
+++ b/source/Panel/BehaviorDetails/BehaviorDetails.tsx
@@ -4,6 +4,8 @@ import { Behavior } from "@Model/Behavior";
import { Message } from "@Component/Message/Message";
import { AttrInput } from "@Component/AttrInput/AttrInput";
import { ColorInput } from "@Component/ColorInput/ColorInput";
+import { TogglesInput } from "@Component/TogglesInput/TogglesInput";
+import { ConfirmPopup } from "@Component/ConfirmPopup/ConfirmPopup";
import "./BehaviorDetails.scss";
interface IBehaviorDetailsProps {}
@@ -31,6 +33,34 @@ class BehaviorDetails extends Component
+ {
+ if (this.props.status) {
+ const status = this.props.status;
+ status.popup.showPopup(ConfirmPopup, {
+ infoI18n: "Popup.Delete.Behavior.Confirm",
+ titleI18N: "Popup.Action.Objects.Confirm.Title",
+ yesI18n: "Popup.Action.Objects.Confirm.Delete",
+ red: "yes",
+ yes: () => {
+ status.model.deleteBehavior(behavior);
+ status.setBehaviorObject();
+ }
+ })
+ }
+ }}
+ />
+
+
+
>;
}
diff --git a/source/Panel/BehaviorList/BehaviorList.tsx b/source/Panel/BehaviorList/BehaviorList.tsx
index 4be877d..f07d8d4 100644
--- a/source/Panel/BehaviorList/BehaviorList.tsx
+++ b/source/Panel/BehaviorList/BehaviorList.tsx
@@ -63,6 +63,7 @@ class BehaviorList extends Component {
status.model.deleteBehavior(behavior);
+ status.setBehaviorObject();
}
})
}
diff --git a/source/Panel/GroupDetails/GroupDetails.tsx b/source/Panel/GroupDetails/GroupDetails.tsx
index c125ae5..26dd47f 100644
--- a/source/Panel/GroupDetails/GroupDetails.tsx
+++ b/source/Panel/GroupDetails/GroupDetails.tsx
@@ -121,9 +121,11 @@ class GroupDetails extends Component {
+ if (behavior.isDeleted()) return;
this.props.status?.setBehaviorObject(behavior);
}}
action={(behavior) => {
+ if (behavior.isDeleted()) return;
this.props.status?.setBehaviorObject(behavior);
setTimeout(() => {
this.props.setting?.layout.focus("BehaviorDetails");