Skip to content

Commit

Permalink
Resolve multiple objects for a selection when they don't share a comm…
Browse files Browse the repository at this point in the history
…on object in the scene

adeira-source-id: 2f36ed7f5f6da82cdc7f9049116957ca59f5c1d8
  • Loading branch information
itsdouges authored and triplex-bot committed Jan 3, 2025
1 parent f03da4f commit dee09ea
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/four-tomatoes-share.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@triplex/renderer": patch
---

Selecting a fragment now highlights all child elements in the scene.
5 changes: 5 additions & 0 deletions .changeset/healthy-walls-play.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@triplex/renderer": patch
---

Jump to element on fragments now focuses the camera on all of the child elements instead of the first child element.
12 changes: 8 additions & 4 deletions examples/test-fixture/src/cards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* file in the root directory of this source tree.
*/

import { Fragment } from "react";

function Card({ children }: { children: React.ReactNode }) {
return (
<div
Expand Down Expand Up @@ -61,10 +63,12 @@ export function CardExample() {
return (
<Card>
<CardHero />
<CardTitle>Inner Light</CardTitle>
<CardContent>
<span>Elderbrook & Bob Moses</span>
</CardContent>
<Fragment>
<CardTitle>Inner Light</CardTitle>
<CardContent>
<span>Elderbrook & Bob Moses</span>
</CardContent>
</Fragment>
</Card>
);
}

0 comments on commit dee09ea

Please sign in to comment.