Skip to content

Conversation

@cornhundred
Copy link
Collaborator

Summary

  • add a rotate trait to the Landscape widget API and forward it through the front-end renderer
  • introduce shared rotation utilities and apply the rotation matrix to all deck.gl landscape layers
  • update viewport calculations to fetch tiles and filter data correctly when the visualization is rotated

Testing

  • pytest --override-ini addopts="" tests/unit/test_viz/test_widget.py

Codex Task

@cornhundred cornhundred requested a review from Copilot November 15, 2025 19:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds configurable rotation support to landscape visualizations by introducing a rotate parameter that allows users to specify rotation angles in degrees for 2D views.

Key Changes:

  • Added rotate trait to the Landscape widget API (Python and JavaScript)
  • Implemented shared rotation utilities with matrix transformations and point rotation functions
  • Updated viewport calculations to correctly handle rotated visualizations when fetching tiles and filtering data

Reviewed Changes

Copilot reviewed 13 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/celldega/viz/widget.py Added rotate traitlet to expose rotation angle parameter
js/widget.js Forwarded rotate parameter from model to renderer
js/viz/landscape_ist.js Initialized rotation state with center coordinates and passed to trx_layer
js/utils/rotation.js Created rotation utilities including matrix building and point transformation functions
js/deck-gl/layers/trx_layer.js Applied rotation matrix to transcript layer
js/deck-gl/layers/simple_image_layer.js Applied rotation matrix to simple image layer
js/deck-gl/layers/path_layer.js Applied rotation matrix to path layer
js/deck-gl/layers/nbhd_layer.js Applied rotation matrix to neighborhood layer
js/deck-gl/layers/image_layers.js Applied rotation matrix to image layers
js/deck-gl/layers/edit_layer.js Applied rotation matrix to edit layer
js/deck-gl/layers/cell_layer.js Applied rotation matrix to both PointCloudLayer and ScatterplotLayer variants
js/deck-gl/layers/background_layer.js Applied rotation matrix to background layer
js/deck-gl/core/calc_viewport.js Updated viewport bounds calculation to account for rotation and modified transcript/cell filtering logic

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cornhundred cornhundred marked this pull request as ready for review November 15, 2025 19:27
@cornhundred
Copy link
Collaborator Author

I used Codex to implement a rotation argument for the Landscape widget. It works in my testing and the implementation looks ok. I'm gong to use it to rotate a Xenium dataset to match the orientation with a Visium HD dataset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants