Repository navigation
feat(tilegrid): a tile opened says where its picture is (onopen) - #29
Merged
Merged
Conversation
TileGrid takes onopen, in place of onactivate: given the key of a tile opened and where its picture is in the window, a Spot, for a photo viewer to fly the photo out of and back into. A tile opened by a key says it as one opened by a press does. Each tile keeps its picture as the renderer mounted it, and the grid asks the renderer where it is as the tile opens, so onopen is given a moment after the press; None where the renderer cannot say. The gallery's photos fly out of their tiles rather than out of where they were pressed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
This follows on from #28.
TileGridcan now report where a tile's picture is on screen when the tile is opened, so a photo viewer can fly the photo out of the actual thumbnail. Until now a host could only pass the point where the press went down.onopen: Option<EventHandler<(String, Option<Spot>)>>, which is called in place ofonactivatewhen it's given. It receives:.unit-tile-face), as aSpot::rect. This is whatPhoto::fromtakes.MountedDatafromonmounted, held in the grid'sFacesand released when the tile drops. When a tile opens, the grid asks the renderer for that picture's client rect.onopenfires a moment after the press. The spot isNonewhere the renderer can't say.onactivateare unchanged.Gallery
The Photos grid uses
onopen. A photo now flies out of its own tile instead of out of the point where it was pressed. The press-recording wrapper is gone.Tests
The Blitz flight test now checks that the photo:
All
ship cilanes pass locally: fmt, clippy (native and wasm), tests light and dark, and docs.Generated by Claude Code