tudo-aqua / bgw

BoardGameWork
https://tudo-aqua.github.io/bgw/
Apache License 2.0
24 stars 16 forks source link

[bgw-gui] CameraPane component 📷 #374

Closed abouzerda closed 1 year ago

abouzerda commented 1 year ago

Zoom functionality: I introduced a zoom property that allows users to control the zoom factor of the camera pane.

Interactive mode: I implemented an interactive property that determines whether the camera pane is interactive or not. When interactive mode is enabled, users can scroll to zoom in and out, as well as drag to move around the content.

Scroll position tracking: I added a scroll property that represents the current scrolling window's upper-left corner.

Panning functionality: I included two methods, pan and panBy, which allow users to programmatically scroll the camera pane to specific coordinates or by given offsets.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage has no change and project coverage change: -0.21 :warning:

Comparison is base (c6ce44e) 14.28% compared to head (f924b60) 14.07%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #374 +/- ## ========================================== - Coverage 14.28% 14.07% -0.21% ========================================== Files 274 276 +2 Lines 7098 7202 +104 Branches 948 962 +14 ========================================== Hits 1014 1014 - Misses 6025 6129 +104 Partials 59 59 ``` | [Impacted Files](https://app.codecov.io/gh/tudo-aqua/bgw/pull/374?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tudo-aqua) | Coverage Δ | | |---|---|---| | [...kotlin/tools/aqua/bgw/builder/CameraPaneBuilder.kt](https://app.codecov.io/gh/tudo-aqua/bgw/pull/374?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tudo-aqua#diff-Ymd3LWd1aS9zcmMvbWFpbi9rb3RsaW4vdG9vbHMvYXF1YS9iZ3cvYnVpbGRlci9DYW1lcmFQYW5lQnVpbGRlci5rdA==) | `0.00% <0.00%> (ø)` | | | [...lin/tools/aqua/bgw/builder/ContainerNodeBuilder.kt](https://app.codecov.io/gh/tudo-aqua/bgw/pull/374?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tudo-aqua#diff-Ymd3LWd1aS9zcmMvbWFpbi9rb3RsaW4vdG9vbHMvYXF1YS9iZ3cvYnVpbGRlci9Db250YWluZXJOb2RlQnVpbGRlci5rdA==) | `0.00% <0.00%> (ø)` | | | [.../main/kotlin/tools/aqua/bgw/builder/NodeBuilder.kt](https://app.codecov.io/gh/tudo-aqua/bgw/pull/374?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tudo-aqua#diff-Ymd3LWd1aS9zcmMvbWFpbi9rb3RsaW4vdG9vbHMvYXF1YS9iZ3cvYnVpbGRlci9Ob2RlQnVpbGRlci5rdA==) | `0.00% <0.00%> (ø)` | | | [...bgw/components/container/GameComponentContainer.kt](https://app.codecov.io/gh/tudo-aqua/bgw/pull/374?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tudo-aqua#diff-Ymd3LWd1aS9zcmMvbWFpbi9rb3RsaW4vdG9vbHMvYXF1YS9iZ3cvY29tcG9uZW50cy9jb250YWluZXIvR2FtZUNvbXBvbmVudENvbnRhaW5lci5rdA==) | `62.00% <ø> (ø)` | | | [...ools/aqua/bgw/components/layoutviews/CameraPane.kt](https://app.codecov.io/gh/tudo-aqua/bgw/pull/374?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tudo-aqua#diff-Ymd3LWd1aS9zcmMvbWFpbi9rb3RsaW4vdG9vbHMvYXF1YS9iZ3cvY29tcG9uZW50cy9sYXlvdXR2aWV3cy9DYW1lcmFQYW5lLmt0) | `0.00% <0.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.