Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support snapping to elements inside orthogonal view attachments #5633

Merged
merged 20 commits into from
Jun 14, 2023

Conversation

pmconne
Copy link
Member

@pmconne pmconne commented Jun 14, 2023

Fixes #5585.

Viewport.readPixels will now include the Id of the view attachment, if any, from which the hit originated.
HitDetail can have a ViewAttachmentHitInfo which includes that view attachment Id along with (marked as @alpha - for internal consumption only!) the Viewport used to render the attachment into the sheet view.
ViewState.computeDisplayTransform now accepts an optional view attachment Id, which a sheet will use to provide the transform from that attachment's model space to the sheet's model space.
AccuSnap will populate the SnapRequestProps using the view attachment's viewport if present, instead of the screen viewport.
The inverted display transform is applied to hit points when making the request, and the display transform is applied to sprite and hit decoration locations.

I had to add yet another optional argument to HitDetail, which already took over a dozen arguments. I overloaded that constructor to take a single object and deprecated the old one.

@pmconne pmconne marked this pull request as ready for review June 14, 2023 13:44
@pmconne pmconne requested review from kabentley, bbastings and a team as code owners June 14, 2023 13:44
@pmconne pmconne requested a review from a team as a code owner June 14, 2023 18:03
@pmconne pmconne enabled auto-merge (squash) June 14, 2023 18:04
@pmconne
Copy link
Member Author

pmconne commented Jun 14, 2023

@ben-polinsky @MichaelBelousov transformer docs still breaking this PR. New error.

Starting: Download Transformer Docs Docs Artifact
==============================================================================
Task         : Download Pipeline Artifacts
Description  : Download build and pipeline artifacts
Version      : 2.198.0
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/download-pipeline-artifact
==============================================================================
Download from the specified build: #2212613
Download artifact to: D:\vsts_a\3/Transformer Docs
##[error]Artifact Transformer Docs was not found for build 2212613.
Finishing: Download Transformer Docs Docs Artifact

@ben-polinsky
Copy link
Contributor

@pmconne Once this pr merges you should be good to go.

branch 'pmc/view-attachment-snap' of https://github.com/iTwin/itwinjs-core into pmc/view-attachment-snap
@pmconne pmconne merged commit 6396673 into master Jun 14, 2023
@pmconne pmconne deleted the pmc/view-attachment-snap branch June 14, 2023 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support snapping to elements inside orthogonal view attachments
4 participants