Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions crates/rustmotion-studio/src/components/color_picker/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,18 @@
absolute popover under the trigger. Single divergence for our right-docked
inspector: right-anchored (right:0) instead of upstream's left:0, so it
opens leftward. Values themed to --rm-*. */
/* Overlay escape (no measurement): `position:fixed` with `top:auto` keeps
the box at its STATIC position — vertically level with its trigger row —
while escaping every `overflow` ancestor (the scrollable inspector panel
clipped the absolute version). Horizontally `right: 308px` (300px panel
width constant + 8px gap) lays it just left of the panel, OVER the canvas,
always. No ancestor has transform/filter/perspective, so no containing
block hijacks the fixed positioning. */
.dx-color-picker-popover {
position: absolute;
position: fixed;
z-index: 1000;
top: 100%;
right: 0;
top: auto;
right: 308px;
left: auto;
display: block;
border-radius: 0.5rem;
Expand Down
9 changes: 7 additions & 2 deletions crates/rustmotion-studio/src/editor/inspector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -611,11 +611,16 @@ pub fn InspectorPanel(
// Provide the debounce handle so all child write helpers share one slot.
use_context_provider(|| WriteDebounce(Rc::new(RefCell::new(None))));
// One expanded color picker at a time across the whole panel.
let open_picker = use_signal(|| None::<u64>);
let mut open_picker = use_signal(|| None::<u64>);
use_context_provider(|| crate::components::color_picker::OpenPicker(open_picker));
let fam = family(&kind);
rsx! {
div { style: "width:300px; flex:none; min-height:0; background:var(--rm-surface); border-left:1px solid var(--rm-border); box-sizing:border-box; display:flex; flex-direction:column; overflow:auto;",
div {
style: "width:300px; flex:none; min-height:0; background:var(--rm-surface); border-left:1px solid var(--rm-border); box-sizing:border-box; display:flex; flex-direction:column; overflow:auto;",
// The open picker popover is `position:fixed` at its trigger's
// static position: it doesn't follow the panel scroll, so close
// it when the panel scrolls (standard dropdown behavior).
onscroll: move |_| open_picker.set(None),
div {
style: "padding:14px; display:flex; justify-content:space-between; align-items:center;",
div {
Expand Down
Loading