Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions app/frontend/src/app/IModelBrowser/IModelBrowser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ export function IModelTile(props: IModelTileProps): React.ReactElement {
<Tile
name={props.name}
description={props.description ?? <Text isSkeleton />}
thumbnail={thumbnail ? <img style={{ objectFit: "cover" }} src={thumbnail} alt="" /> : <div ref={divRef} id="imodel-thumbnail-placeholder" />}
thumbnail={thumbnail ? thumbnail : <div ref={divRef} id="imodel-thumbnail-placeholder" />}
isActionable
onClick={async () => navigation.openRulesetEditor({ iTwinId: props.iTwinId, iModelId: props.iModelId })}
/>
Expand All @@ -307,22 +307,14 @@ 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 (
<Tile
name={props.name}
description="Snapshot iModel"
thumbnail={<SvgImodel />}
isActionable
onClick={async (event) => handleTileClick(event)}
onClick={async () => navigation.openRulesetEditor(props.name)}
moreOptions={[
<MenuItem key="open-folder" onClick={props.openSnapshotsFolder}>
Open containing folder
Expand Down
19 changes: 9 additions & 10 deletions app/frontend/src/app/IModelBrowser/ITwinIModelBrowser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,15 @@ function ITwinBrowserGridView(props: ITwinBrowserGridViewProps): React.ReactElem
return (
<FluidGrid>
{props.iTwins.map((iTwin) => (
<div key={iTwin.id}>
<Tile
name={iTwin.displayName}
variant="folder"
isActionable
thumbnail={iTwin.image ?? <SvgProject />}
description={iTwin.number}
onClick={async () => navigate(iTwin.id)}
/>
</div>
<Tile
key={iTwin.id}
name={iTwin.displayName}
variant="folder"
isActionable
thumbnail={iTwin.image ?? <SvgProject />}
description={iTwin.number}
onClick={async () => navigate(iTwin.id)}
/>
))}
</FluidGrid>
);
Expand Down
2 changes: 1 addition & 1 deletion app/frontend/src/app/ITwinJsApp/InitializedApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ const defaultRuleset: Ruleset = {
classes: {
schemaName: "BisCore",
classNames: ["Element"],
arePolymorphic: true,
},
arePolymorphic: true,
groupByClass: true,
},
],
Expand Down
Loading