From 3e64b7050138cd8d1a4c91f5f604474108854c46 Mon Sep 17 00:00:00 2001
From: Saulius Skliutas <24278440+saskliutas@users.noreply.github.com>
Date: Wed, 18 Dec 2024 12:35:25 +0200
Subject: [PATCH] Fix app UI (#177)
---
.../src/app/IModelBrowser/IModelBrowser.tsx | 12 ++----------
.../app/IModelBrowser/ITwinIModelBrowser.tsx | 19 +++++++++----------
.../src/app/ITwinJsApp/InitializedApp.tsx | 2 +-
3 files changed, 12 insertions(+), 21 deletions(-)
diff --git a/app/frontend/src/app/IModelBrowser/IModelBrowser.tsx b/app/frontend/src/app/IModelBrowser/IModelBrowser.tsx
index 12b1737..08be213 100644
--- a/app/frontend/src/app/IModelBrowser/IModelBrowser.tsx
+++ b/app/frontend/src/app/IModelBrowser/IModelBrowser.tsx
@@ -293,7 +293,7 @@ export function IModelTile(props: IModelTileProps): React.ReactElement {
}
- thumbnail={thumbnail ?
:
}
+ thumbnail={thumbnail ? thumbnail : }
isActionable
onClick={async () => navigation.openRulesetEditor({ iTwinId: props.iTwinId, iModelId: props.iModelId })}
/>
@@ -307,14 +307,6 @@ export interface IModelSnapshotTileProps {
export function IModelSnapshotTile(props: IModelSnapshotTileProps): React.ReactElement {
const navigation = React.useContext(appNavigationContext);
- const handleTileClick = async (event: React.MouseEvent) => {
- // This function is called whenever any element within the tile is clicked
- if ((event.target as Element).matches("button[aria-label='More options'], button[aria-label='More options'] *")) {
- return;
- }
-
- await navigation.openRulesetEditor(props.name);
- };
return (
}
isActionable
- onClick={async (event) => handleTileClick(event)}
+ onClick={async () => navigation.openRulesetEditor(props.name)}
moreOptions={[