-
Notifications
You must be signed in to change notification settings - Fork 373
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
Introduce a new blueprint archetype for AxisY configuration in a plot. #5028
Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
3dd0fc2
Allow python to handle mixed-scope imports
jleibs ebd1ee7
Update the python codegen
jleibs 6a0878c
Fix imports
jleibs b654baa
Introduce new components for controlling range and zoom behavior
jleibs 740db2a
codegen
jleibs 5ff5f5d
UI for setting the new AxisY controls
jleibs 44ebffd
Account for the new controls
jleibs befafd7
Make Range1D a double
jleibs 3906408
Use the current state to set the range, and also track when we edit t…
jleibs a0f4daf
Clarify that default behavior for unset Range is Auto
jleibs ba52f31
Make the auto behavior more intuitive since we are tracking edited ex…
jleibs 8b8c182
Merge remote-tracking branch 'origin/main' into jleibs/axis_y
Wumpf 768d351
Merge remote-tracking branch 'origin/main' into jleibs/axis_y
Wumpf a2c45fc
prevent invalid ranges in ui
Wumpf 3984088
Also use y_range when using ASPECT_SCROLL_MODIFIER
jleibs 61f16e0
Don't allow scroll when range is locked
jleibs 195a10e
Rename components and make lock range a boolean
jleibs 099cbbc
codegen
jleibs c61b3a0
Updates for changed components
jleibs f4a2cd0
Put Y Axis in a collapsing header
jleibs a7eb4c6
Still allow shift+scroll for horizontal scrolling
jleibs 69b6205
Lints
jleibs 83720c7
Merge remote-tracking branch 'origin/main' into jleibs/axis_y
Wumpf 7fea571
fix doc errors
Wumpf 7094159
Merge branch 'main' into jleibs/axis_y
jleibs fce4063
Allow scroll and re-enable box-zoom
jleibs 4e2ca76
Link issue
jleibs 4087df6
Remove comment about drag zoom not workign
jleibs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
28 changes: 28 additions & 0 deletions
28
crates/re_types/definitions/rerun/blueprint/archetypes/scalar_axis.fbs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
include "arrow/attributes.fbs"; | ||
include "python/attributes.fbs"; | ||
include "rust/attributes.fbs"; | ||
|
||
include "rerun/datatypes.fbs"; | ||
include "rerun/attributes.fbs"; | ||
|
||
namespace rerun.blueprint.archetypes; | ||
|
||
|
||
// --- | ||
|
||
/// Configuration for the scalar axis of a plot. | ||
table ScalarAxis ( | ||
"attr.docs.unreleased", | ||
"attr.rerun.scope": "blueprint", | ||
"attr.rust.derive": "Default" | ||
) { | ||
// --- Optional --- | ||
|
||
/// The range of the axis. | ||
/// | ||
/// If unset, the range well be automatically determined based on the queried data. | ||
range: rerun.components.Range1D ("attr.rerun.component_optional", nullable, order: 2100); | ||
|
||
/// Whether to lock the range of the axis during zoom. | ||
lock_range_during_zoom: rerun.blueprint.components.LockRangeDuringZoom ("attr.rerun.component_optional", nullable, order: 2200); | ||
} |
24 changes: 24 additions & 0 deletions
24
crates/re_types/definitions/rerun/blueprint/components/lock_range_during_zoom.fbs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
include "arrow/attributes.fbs"; | ||
include "python/attributes.fbs"; | ||
include "rust/attributes.fbs"; | ||
|
||
include "rerun/datatypes.fbs"; | ||
include "rerun/attributes.fbs"; | ||
|
||
namespace rerun.blueprint.components; | ||
|
||
// --- | ||
|
||
/// Indicate whether the range should be locked when zooming in on the data. | ||
/// | ||
/// Default is `false`, i.e. zoom will change the visualized range. | ||
struct LockRangeDuringZoom ( | ||
"attr.docs.unreleased", | ||
"attr.arrow.transparent", | ||
"attr.rerun.scope": "blueprint", | ||
"attr.rust.derive": "Copy, PartialEq, Eq", | ||
"attr.rust.repr": "transparent", | ||
"attr.rust.tuple_struct" | ||
) { | ||
lock_range: bool (order: 100); | ||
} |
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't that mean the scroll delta is zero everywhere?
hm, doesn't seem to affect anything else. okay