优化工具栏面板关闭逻辑,增强用户体验
This commit is contained in:
@@ -877,7 +877,15 @@ const Toolbar: React.FC<ToolbarProps> = ({
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
{showPropertyPanel && <PropertyPanel {...getFeatureProperties()} />}
|
||||
{showPropertyPanel && (
|
||||
<PropertyPanel
|
||||
{...getFeatureProperties()}
|
||||
onClose={() => {
|
||||
deactivateTool("info");
|
||||
setActiveTools((prev) => prev.filter((t) => t !== "info"));
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
{showDrawPanel && map && <DrawPanel />}
|
||||
<div style={{ display: showStyleEditor ? "block" : "none" }}>
|
||||
<StyleEditorPanel
|
||||
@@ -892,6 +900,10 @@ const Toolbar: React.FC<ToolbarProps> = ({
|
||||
visible={showHistoryPanel}
|
||||
start_time={chatPanelTimeRange?.startTime}
|
||||
end_time={chatPanelTimeRange?.endTime}
|
||||
onClose={() => {
|
||||
deactivateTool("history");
|
||||
setActiveTools((prev) => prev.filter((t) => t !== "history"));
|
||||
}}
|
||||
/>
|
||||
) : HistoryPanel ? (
|
||||
<HistoryPanel
|
||||
@@ -936,6 +948,10 @@ const Toolbar: React.FC<ToolbarProps> = ({
|
||||
type={chatPanelFeatureInfos ? chatPanelType : (queryType as "realtime" | "scheme" | "none")}
|
||||
start_time={chatPanelTimeRange?.startTime}
|
||||
end_time={chatPanelTimeRange?.endTime}
|
||||
onClose={() => {
|
||||
deactivateTool("history");
|
||||
setActiveTools((prev) => prev.filter((t) => t !== "history"));
|
||||
}}
|
||||
/>
|
||||
) : (
|
||||
<HistoryDataPanel
|
||||
@@ -980,6 +996,10 @@ const Toolbar: React.FC<ToolbarProps> = ({
|
||||
type={chatPanelFeatureInfos ? chatPanelType : (queryType as "realtime" | "scheme" | "none")}
|
||||
start_time={chatPanelTimeRange?.startTime}
|
||||
end_time={chatPanelTimeRange?.endTime}
|
||||
onClose={() => {
|
||||
deactivateTool("history");
|
||||
setActiveTools((prev) => prev.filter((t) => t !== "history"));
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user