Compare commits
	
		
			No commits in common. "24728c9ef46c629164acb251932a67c1efb96849" and "edb24b27fb024572f57551092944f895389a17a8" have entirely different histories.
		
	
	
		
			24728c9ef4
			...
			edb24b27fb
		
	
		
| @ -19,9 +19,9 @@ steps: | |||||||
|   commands: |   commands: | ||||||
|   - npm config set registry https://registry.npm.taobao.org |   - npm config set registry https://registry.npm.taobao.org | ||||||
|   - npm ci |   - npm ci | ||||||
| # - npm run release-lab |   - npm run release-lab | ||||||
| # - rm -rf ./build_lab/* |   - rm -rf ./build_lab/* | ||||||
| # - cp ./build/* ./build_lab |   - cp ./build/* ./build_lab | ||||||
|   - npm run release-web |   - npm run release-web | ||||||
|   - rm -rf ./build_web/* |   - rm -rf ./build_web/* | ||||||
|   - cp ./build/* ./build_web |   - cp ./build/* ./build_web | ||||||
|  | |||||||
| @ -38,7 +38,6 @@ div.label { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| div.dark.label { | div.dark.label { | ||||||
|     transition: none; |  | ||||||
|     background-color: $lt-bg-color-lvl3-dark; |     background-color: $lt-bg-color-lvl3-dark; | ||||||
| 
 | 
 | ||||||
|     div.label-color { |     div.label-color { | ||||||
| @ -46,12 +45,12 @@ div.dark.label { | |||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     div.delete-button:hover { |     div.delete-button:hover { | ||||||
|         color: $lt-red; |         color: $lt-font-color-lvl2-dark; | ||||||
|  |         background-color: $lt-bg-color-lvl2-dark; | ||||||
|     } |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| div.light.label { | div.light.label { | ||||||
|     transition: none; |  | ||||||
|     background-color: $lt-bg-color-lvl3-light; |     background-color: $lt-bg-color-lvl3-light; | ||||||
| 
 | 
 | ||||||
|     div.label-color { |     div.label-color { | ||||||
| @ -59,18 +58,7 @@ div.light.label { | |||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     div.delete-button:hover { |     div.delete-button:hover { | ||||||
|         color: $lt-red; |         color: $lt-font-color-lvl2-light; | ||||||
|  |         background-color: $lt-bg-color-lvl2-light; | ||||||
|     } |     } | ||||||
| } | } | ||||||
| 
 |  | ||||||
| div.dark.label:hover, |  | ||||||
| div.dark.label.focus { |  | ||||||
|     color: $lt-font-color-lvl2-dark; |  | ||||||
|     background-color: $lt-bg-color-lvl2-dark; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| div.light.label:hover, |  | ||||||
| div.light.label.focus { |  | ||||||
|     color: $lt-font-color-lvl2-light; |  | ||||||
|     background-color: $lt-bg-color-lvl2-light; |  | ||||||
| } |  | ||||||
| @ -2,82 +2,54 @@ import { Component } from "react"; | |||||||
| import { Label } from "@Model/Label"; | import { Label } from "@Model/Label"; | ||||||
| import { Icon } from "@fluentui/react"; | import { Icon } from "@fluentui/react"; | ||||||
| import { useSetting, IMixinSettingProps, Themes } from "@Context/Setting"; | import { useSetting, IMixinSettingProps, Themes } from "@Context/Setting"; | ||||||
| import { ErrorMessage } from "@Component/ErrorMessage/ErrorMessage"; |  | ||||||
| import "./LabelList.scss"; | import "./LabelList.scss"; | ||||||
| 
 | 
 | ||||||
| interface ILabelListProps { | interface ILabelListProps { | ||||||
|     labels: Label[]; |     labels: Label[]; | ||||||
|     canDelete?: boolean; |     canDelete?: boolean; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | interface ILabelListState { | ||||||
|     focusLabel?: Label; |     focusLabel?: Label; | ||||||
|     clickLabel?: (label: Label) => any; |  | ||||||
|     deleteLabel?: (label: Label) => any; |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @useSetting | @useSetting | ||||||
| class LabelList extends Component<ILabelListProps & IMixinSettingProps> { | class LabelList extends Component<ILabelListProps & IMixinSettingProps, ILabelListState> { | ||||||
|      |      | ||||||
|     private isDeleteClick: boolean = false; |     public state: Readonly<ILabelListState> = { | ||||||
|  |         focusLabel: undefined | ||||||
|  |     }; | ||||||
| 
 | 
 | ||||||
|     private renderLabel(label: Label) { |     private renderLabel(label: Label) { | ||||||
| 
 | 
 | ||||||
|         const theme = this.props.setting?.themes ?? Themes.dark; |         const theme = this.props.setting?.themes ?? Themes.dark; | ||||||
|         const classList:string[] = ["label"]; |         const themeClassName = theme === Themes.dark ? "dark" : "light"; | ||||||
|         classList.push( theme === Themes.dark ? "dark" : "light" ); |  | ||||||
|         const isFocus = this.props.focusLabel && this.props.focusLabel.equal(label); |  | ||||||
|         if (isFocus) { |  | ||||||
|             classList.push("focus"); |  | ||||||
|         } |  | ||||||
|         const colorCss = `rgb(${label.color.join(",")})`; |         const colorCss = `rgb(${label.color.join(",")})`; | ||||||
| 
 | 
 | ||||||
|         return <div |         return <div className={`label ${themeClassName}`} key={label.id}> | ||||||
|             className={classList.join(" ")} |  | ||||||
|             key={label.id} |  | ||||||
|             onClick={() => { |  | ||||||
|                 if (this.props.clickLabel && !this.isDeleteClick) { |  | ||||||
|                     this.props.clickLabel(label); |  | ||||||
|                 } |  | ||||||
|                 this.isDeleteClick = false; |  | ||||||
|             }} |  | ||||||
|             style={{ |  | ||||||
|                 borderColor: isFocus ? colorCss : undefined |  | ||||||
|             }} |  | ||||||
|         > |  | ||||||
|             <div className="label-color" style={{ |             <div className="label-color" style={{ | ||||||
|                 backgroundColor: colorCss, |                 backgroundColor: colorCss | ||||||
|                 borderRadius: isFocus ? 0 : 3 |  | ||||||
|             }}/> |             }}/> | ||||||
|             <div className="label-name"> |             <div className="label-name"> | ||||||
|                 {label.name} |                 {label.name} | ||||||
|             </div> |             </div> | ||||||
|             { |             { | ||||||
|                 this.props.canDelete ?  |                 this.props.canDelete ?  | ||||||
|                 <div |                 <div className="delete-button"> | ||||||
|                     className="delete-button" |  | ||||||
|                     onClick={() => { |  | ||||||
|                         this.isDeleteClick = true; |  | ||||||
|                         if (this.props.deleteLabel) { |  | ||||||
|                             this.props.deleteLabel(label); |  | ||||||
|                         } |  | ||||||
|                     }} |  | ||||||
|                 > |  | ||||||
|                     <Icon iconName="delete"></Icon> |                     <Icon iconName="delete"></Icon> | ||||||
|                 </div> : null |                 </div> : null | ||||||
|             } |             } | ||||||
|         </div> |         </div> | ||||||
|     } |     } | ||||||
|      |      | ||||||
|     private renderAllLabels(labels: Label[]) { |  | ||||||
|         return this.props.labels.map((label) => { |  | ||||||
|             return this.renderLabel(label); |  | ||||||
|         }); |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public render() { |     public render() { | ||||||
|         if (this.props.labels.length > 0) { |         return <> | ||||||
|             return this.renderAllLabels(this.props.labels); |             { | ||||||
|         } else { |                 this.props.labels.map((label) => { | ||||||
|             return <ErrorMessage i18nKey="Panel.Info.Label.List.Error.Nodata"/> |                     return this.renderLabel(label); | ||||||
|         } |                 }) | ||||||
|  |             } | ||||||
|  |         </> | ||||||
|     } |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,7 +1,6 @@ | |||||||
| import { createContext, Component, FunctionComponent, useState, useEffect, ReactNode } from "react"; | import { createContext, Component, FunctionComponent, useState, useEffect, ReactNode } from "react"; | ||||||
| import { Emitter } from "@Model/Emitter"; | import { Emitter } from "@Model/Emitter"; | ||||||
| import { Model, ObjectID } from "@Model/Model"; | import { Model, ObjectID } from "@Model/Model"; | ||||||
| import { Label } from "@Model/Label"; |  | ||||||
| import { Range } from "@Model/Range"; | import { Range } from "@Model/Range"; | ||||||
| import { Archive } from "@Model/Archive"; | import { Archive } from "@Model/Archive"; | ||||||
| import { AbstractRenderer } from "@Model/Renderer"; | import { AbstractRenderer } from "@Model/Renderer"; | ||||||
| @ -28,7 +27,6 @@ interface IStatusEvent { | |||||||
|     physicsLoop: number; |     physicsLoop: number; | ||||||
|     mouseModChange: void; |     mouseModChange: void; | ||||||
|     focusObjectChange: void; |     focusObjectChange: void; | ||||||
|     focusLabelChange: void; |  | ||||||
|     objectChange: void; |     objectChange: void; | ||||||
|     labelChange: void; |     labelChange: void; | ||||||
|     rangeAttrChange: void; |     rangeAttrChange: void; | ||||||
| @ -64,11 +62,6 @@ class Status extends Emitter<IStatusEvent> { | |||||||
|      */ |      */ | ||||||
|     public focusObject: Set<ObjectID> = new Set(); |     public focusObject: Set<ObjectID> = new Set(); | ||||||
| 
 | 
 | ||||||
|     /** |  | ||||||
|      * 焦点标签 |  | ||||||
|      */ |  | ||||||
|     public focusLabel?: Label; |  | ||||||
| 
 |  | ||||||
|     public constructor() { |     public constructor() { | ||||||
|         super(); |         super(); | ||||||
| 
 | 
 | ||||||
| @ -99,14 +92,6 @@ class Status extends Emitter<IStatusEvent> { | |||||||
|         this.emit("focusObjectChange"); |         this.emit("focusObjectChange"); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     /** |  | ||||||
|      * 更新焦点标签 |  | ||||||
|      */ |  | ||||||
|     public setLabelObject(focusLabel?: Label) { |  | ||||||
|         this.focusLabel = focusLabel; |  | ||||||
|         this.emit("focusLabelChange"); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |     /** | ||||||
|      * 修改范围属性 |      * 修改范围属性 | ||||||
|      */ |      */ | ||||||
|  | |||||||
| @ -36,9 +36,7 @@ const EN_US = { | |||||||
|     "Panel.Title.Range.Details.View": "Range attributes", |     "Panel.Title.Range.Details.View": "Range attributes", | ||||||
|     "Panel.Info.Range.Details.View": "Edit view range attributes", |     "Panel.Info.Range.Details.View": "Edit view range attributes", | ||||||
|     "Panel.Title.Label.List.View": "Label list", |     "Panel.Title.Label.List.View": "Label list", | ||||||
|     "Panel.Info.Label.List.View": "Edit view label list", |     "Panel.Info.Label.List.View": "Edit view label attributes", | ||||||
|     "Panel.Title.Label.Details.View": "Label attributes", |  | ||||||
|     "Panel.Info.Label.Details.View": "Edit view label attributes", |  | ||||||
|     "Common.Attr.Key.Display.Name": "Display name", |     "Common.Attr.Key.Display.Name": "Display name", | ||||||
|     "Common.Attr.Key.Position.X": "Position X", |     "Common.Attr.Key.Position.X": "Position X", | ||||||
|     "Common.Attr.Key.Position.Y": "Position Y", |     "Common.Attr.Key.Position.Y": "Position Y", | ||||||
| @ -52,7 +50,5 @@ const EN_US = { | |||||||
|     "Common.Attr.Key.Error.Multiple": "Multiple values", |     "Common.Attr.Key.Error.Multiple": "Multiple values", | ||||||
|     "Panel.Info.Range.Details.Attr.Error.Not.Range": "Object is not a Range", |     "Panel.Info.Range.Details.Attr.Error.Not.Range": "Object is not a Range", | ||||||
|     "Panel.Info.Range.Details.Attr.Error.Unspecified": "Unspecified range object", |     "Panel.Info.Range.Details.Attr.Error.Unspecified": "Unspecified range object", | ||||||
|     "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", |  | ||||||
| } | } | ||||||
| export default EN_US; | export default EN_US; | ||||||
| @ -32,13 +32,11 @@ const ZH_CN = { | |||||||
|     "Panel.Title.Render.View": "实时预览", |     "Panel.Title.Render.View": "实时预览", | ||||||
|     "Panel.Info.Render.View": "实时仿真结果预览", |     "Panel.Info.Render.View": "实时仿真结果预览", | ||||||
|     "Panel.Title.Object.List.View": "对象列表", |     "Panel.Title.Object.List.View": "对象列表", | ||||||
|     "Panel.Info.Object.List.View": "编辑查看全部对象列表", |     "Panel.Info.Object.List.View": "编辑查看全部对象属性", | ||||||
|     "Panel.Title.Range.Details.View": "范围属性", |     "Panel.Title.Range.Details.View": "范围属性", | ||||||
|     "Panel.Info.Range.Details.View": "编辑查看范围属性", |     "Panel.Info.Range.Details.View": "编辑查看范围属性", | ||||||
|     "Panel.Title.Label.List.View": "标签列表", |     "Panel.Title.Label.List.View": "标签列表", | ||||||
|     "Panel.Info.Label.List.View": "编辑查看标签列表", |     "Panel.Info.Label.List.View": "编辑查看标签属性", | ||||||
|     "Panel.Title.Label.Details.View": "标签属性", |  | ||||||
|     "Panel.Info.Label.Details.View": "编辑查看标签属性", |  | ||||||
|     "Common.Attr.Key.Display.Name": "显示名称", |     "Common.Attr.Key.Display.Name": "显示名称", | ||||||
|     "Common.Attr.Key.Position.X": "X 坐标", |     "Common.Attr.Key.Position.X": "X 坐标", | ||||||
|     "Common.Attr.Key.Position.Y": "Y 坐标", |     "Common.Attr.Key.Position.Y": "Y 坐标", | ||||||
| @ -52,7 +50,5 @@ const ZH_CN = { | |||||||
|     "Common.Attr.Key.Error.Multiple": "多重数值", |     "Common.Attr.Key.Error.Multiple": "多重数值", | ||||||
|     "Panel.Info.Range.Details.Attr.Error.Not.Range": "对象不是一个范围", |     "Panel.Info.Range.Details.Attr.Error.Not.Range": "对象不是一个范围", | ||||||
|     "Panel.Info.Range.Details.Attr.Error.Unspecified": "未指定范围对象", |     "Panel.Info.Range.Details.Attr.Error.Unspecified": "未指定范围对象", | ||||||
|     "Panel.Info.Label.Details.Error.Unspecified": "未指定标签对象", |  | ||||||
|     "Panel.Info.Label.List.Error.Nodata": "模型中没有标签,点击按钮以创建", |  | ||||||
| } | } | ||||||
| export default ZH_CN; | export default ZH_CN; | ||||||
| @ -77,7 +77,7 @@ class SimulatorWeb extends Component { | |||||||
|                     items: [{ |                     items: [{ | ||||||
|                         panels: ["ObjectList", "Test tab"] |                         panels: ["ObjectList", "Test tab"] | ||||||
|                     }, { |                     }, { | ||||||
|                         panels: ["RangeDetails", "LabelDetails"] |                         panels: ["RangeDetails", "Label e"] | ||||||
|                     }], |                     }], | ||||||
|                     layout: LayoutDirection.Y |                     layout: LayoutDirection.Y | ||||||
|                 } |                 } | ||||||
|  | |||||||
| @ -1,54 +0,0 @@ | |||||||
| import { Component, ReactNode } from "react"; |  | ||||||
| import { AttrInput } from "@Component/AttrInput/AttrInput"; |  | ||||||
| import { useStatusWithEvent, IMixinStatusProps } from "@Context/Status"; |  | ||||||
| import { AllI18nKeys } from "@Component/Localization/Localization"; |  | ||||||
| import { ErrorMessage } from "@Component/ErrorMessage/ErrorMessage"; |  | ||||||
| import { ColorInput } from "@Component/ColorInput/ColorInput"; |  | ||||||
| import "./LabelDetails.scss"; |  | ||||||
| import { LabelList } from "@Component/LabelList/LabelList"; |  | ||||||
| import { Label } from "@Model/Label"; |  | ||||||
| 
 |  | ||||||
| @useStatusWithEvent("focusLabelChange") |  | ||||||
| class LabelDetails extends Component<IMixinStatusProps> { |  | ||||||
|      |  | ||||||
|     public readonly AttrI18nKey: AllI18nKeys[] = [ |  | ||||||
|         "Common.Attr.Key.Display.Name", |  | ||||||
|         "Common.Attr.Key.Color", |  | ||||||
|     ] |  | ||||||
| 
 |  | ||||||
|     private renderFrom(label: Label) { |  | ||||||
|         return <> |  | ||||||
| 
 |  | ||||||
|             <LabelList |  | ||||||
|                 labels={[label]} |  | ||||||
|                 canDelete |  | ||||||
|                 deleteLabel={() => { |  | ||||||
|                     if (this.props.status) { |  | ||||||
|                         this.props.status.model.deleteLabel(label); |  | ||||||
|                         this.props.status.setLabelObject(); |  | ||||||
|                     } |  | ||||||
|                 }} |  | ||||||
|             /> |  | ||||||
|              |  | ||||||
|             <AttrInput keyI18n="Common.Attr.Key.Display.Name" maxLength={15} value={label.name}/> |  | ||||||
| 
 |  | ||||||
|             <ColorInput keyI18n="Common.Attr.Key.Color" value={label.color} valueChange={(color) => { |  | ||||||
|                 if (this.props.status) { |  | ||||||
|                      |  | ||||||
|                 } |  | ||||||
|             }}/> |  | ||||||
| 
 |  | ||||||
| 		</>; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
| 	public render(): ReactNode { |  | ||||||
|         if (this.props.status) { |  | ||||||
|             if (this.props.status.focusLabel) { |  | ||||||
|                 return this.renderFrom(this.props.status.focusLabel); |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
| 		return <ErrorMessage i18nKey="Panel.Info.Label.Details.Error.Unspecified"/>; |  | ||||||
| 	} |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| export { LabelDetails }; |  | ||||||
| @ -1,8 +1,33 @@ | |||||||
| @import "../../Component/Theme/Theme.scss"; | @import "../../Component/Theme/Theme.scss"; | ||||||
| 
 | 
 | ||||||
| div.label-list-panel-root { | div.label-list-command-bar { | ||||||
|     width: 100%; |     width: 100%; | ||||||
|     height: 100%; |     height: 30px; | ||||||
|     padding: 10px; |     flex-shrink: 0; | ||||||
|     box-sizing: border-box; |     display: flex; | ||||||
|  | 
 | ||||||
|  |     div.command-item { | ||||||
|  |         width: 30px; | ||||||
|  |         height: 100%; | ||||||
|  |         display: flex; | ||||||
|  |         flex-shrink: 0; | ||||||
|  |         justify-content: center; | ||||||
|  |         align-items: center; | ||||||
|  |         user-select: none; | ||||||
|  |         cursor: pointer; | ||||||
|  |     } | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | div.dark.label-list-command-bar { | ||||||
|  | 
 | ||||||
|  |     div.command-item:hover { | ||||||
|  |         background-color: $lt-bg-color-lvl3-dark; | ||||||
|  |     } | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | div.light.label-list-command-bar { | ||||||
|  | 
 | ||||||
|  |     div.command-item:hover { | ||||||
|  |         background-color: $lt-bg-color-lvl3-light; | ||||||
|  |     } | ||||||
| } | } | ||||||
| @ -1,7 +1,7 @@ | |||||||
|  | import { Theme } from "@Component/Theme/Theme"; | ||||||
| import { LabelList as LabelListComponent } from "@Component/LabelList/LabelList"; | import { LabelList as LabelListComponent } from "@Component/LabelList/LabelList"; | ||||||
| import { Component } from "react"; | import { Component } from "react"; | ||||||
| import { useStatusWithEvent, IMixinStatusProps } from "@Context/Status"; | import { useStatusWithEvent, IMixinStatusProps } from "@Context/Status"; | ||||||
| import { useSetting, IMixinSettingProps } from "@Context/Setting"; |  | ||||||
| import { Label } from "@Model/Label"; | import { Label } from "@Model/Label"; | ||||||
| import "./LabelList.scss"; | import "./LabelList.scss"; | ||||||
| 
 | 
 | ||||||
| @ -9,48 +9,15 @@ interface ILabelListProps { | |||||||
| 
 | 
 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @useSetting | @useStatusWithEvent("labelChange") | ||||||
| @useStatusWithEvent("labelChange", "focusLabelChange") | class LabelList extends Component<ILabelListProps & IMixinStatusProps> { | ||||||
| class LabelList extends Component<ILabelListProps & IMixinStatusProps & IMixinSettingProps> { |  | ||||||
|      |  | ||||||
|     private labelInnerClick: boolean = false; |  | ||||||
|      |      | ||||||
|     public render() { |     public render() { | ||||||
|         let labels: Label[] = []; |         let labels: Label[] = []; | ||||||
|         if (this.props.status) { |         if (this.props.status) { | ||||||
|             labels = this.props.status.model.labelPool.concat([]); |             labels = this.props.status.model.labelPool.concat([]); | ||||||
|         } |         } | ||||||
|         return <div |         return <LabelListComponent labels={labels} canDelete/> | ||||||
|             className="label-list-panel-root" |  | ||||||
|             onClick={() => { |  | ||||||
|                 if (this.props.status && !this.labelInnerClick) { |  | ||||||
|                     this.props.status.setLabelObject(); |  | ||||||
|                 } |  | ||||||
|                 this.labelInnerClick = false; |  | ||||||
|             }} |  | ||||||
|         > |  | ||||||
|             <LabelListComponent |  | ||||||
|                 canDelete |  | ||||||
|                 labels={labels} |  | ||||||
|                 focusLabel={this.props.status ? this.props.status.focusLabel : undefined} |  | ||||||
|                 clickLabel={(label) => { |  | ||||||
|                     if (this.props.status) { |  | ||||||
|                         this.props.status.setLabelObject(label); |  | ||||||
|                     } |  | ||||||
|                     if (this.props.setting) { |  | ||||||
|                         this.props.setting.layout.focus("LabelDetails"); |  | ||||||
|                     } |  | ||||||
|                     this.labelInnerClick = true; |  | ||||||
|                 }} |  | ||||||
|                 deleteLabel={(label) => { |  | ||||||
|                     if (this.props.status) { |  | ||||||
|                         this.props.status.model.deleteLabel(label); |  | ||||||
|                         this.props.status.setLabelObject(); |  | ||||||
|                     } |  | ||||||
|                     this.labelInnerClick = true; |  | ||||||
|                 }} |  | ||||||
|             /> |  | ||||||
|         </div>; |  | ||||||
|     } |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -36,15 +36,12 @@ class ObjectList extends Component<IMixinStatusProps & IMixinSettingProps> { | |||||||
|                 } |                 } | ||||||
|             }))} |             }))} | ||||||
|             clickLine={(item) => { |             clickLine={(item) => { | ||||||
|  |                 if (this.props.setting) { | ||||||
|  |                     this.props.setting.layout.focus("ObjectList"); | ||||||
|  |                 } | ||||||
|                 if (this.props.status) { |                 if (this.props.status) { | ||||||
|                     this.props.status.setFocusObject(new Set<ObjectID>().add(item.key)); |                     this.props.status.setFocusObject(new Set<ObjectID>().add(item.key)); | ||||||
|                 } |                 } | ||||||
|                 if (this.props.setting) { |  | ||||||
|                     if (item.key.slice(0, 1) === "R") { |  | ||||||
|                         this.props.setting.layout.focus("RangeDetails"); |  | ||||||
|                     } |  | ||||||
|                     this.props.setting.layout.focus("ObjectList"); |  | ||||||
|                 } |  | ||||||
|             }} |             }} | ||||||
|             checkBox={(item) => { |             checkBox={(item) => { | ||||||
|                 if (this.props.setting) { |                 if (this.props.setting) { | ||||||
|  | |||||||
| @ -6,7 +6,6 @@ import { ObjectList } from "./ObjectList/ObjectList"; | |||||||
| import { ObjectCommand } from "./ObjectList/ObjectCommand"; | import { ObjectCommand } from "./ObjectList/ObjectCommand"; | ||||||
| import { RangeDetails } from "./RangeDetails/RangeDetails"; | import { RangeDetails } from "./RangeDetails/RangeDetails"; | ||||||
| import { LabelList } from "./LabelList/LabelList"; | import { LabelList } from "./LabelList/LabelList"; | ||||||
| import { LabelDetails } from "./LabelDetails/LabelDetails"; |  | ||||||
| 
 | 
 | ||||||
| interface IPanelInfo { | interface IPanelInfo { | ||||||
| 	nameKey: string; | 	nameKey: string; | ||||||
| @ -24,7 +23,6 @@ type PanelId = "" | |||||||
| | "ObjectList" // 对象列表
 | | "ObjectList" // 对象列表
 | ||||||
| | "RangeDetails" // 范围属性
 | | "RangeDetails" // 范围属性
 | ||||||
| | "LabelList" // 标签列表
 | | "LabelList" // 标签列表
 | ||||||
| | "LabelDetails" // 标签属性
 |  | ||||||
| ; | ; | ||||||
| 
 | 
 | ||||||
| const PanelInfoMap = new Map<PanelId, IPanelInfo>(); | const PanelInfoMap = new Map<PanelId, IPanelInfo>(); | ||||||
| @ -42,11 +40,7 @@ PanelInfoMap.set("RangeDetails", { | |||||||
| }) | }) | ||||||
| PanelInfoMap.set("LabelList", { | PanelInfoMap.set("LabelList", { | ||||||
|     nameKey: "Panel.Title.Label.List.View", introKay: "Panel.Info.Label.List.View", |     nameKey: "Panel.Title.Label.List.View", introKay: "Panel.Info.Label.List.View", | ||||||
|     class: LabelList, hidePadding: true |     class: LabelList | ||||||
| }) |  | ||||||
| PanelInfoMap.set("LabelDetails", { |  | ||||||
|     nameKey: "Panel.Title.Label.Details.View", introKay: "Panel.Info.Label.Details.View", |  | ||||||
|     class: LabelDetails |  | ||||||
| }) | }) | ||||||
| 
 | 
 | ||||||
| function getPanelById(panelId: PanelId): ReactNode { | function getPanelById(panelId: PanelId): ReactNode { | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user