mirror of
https://github.com/penpot/penpot.git
synced 2025-03-12 07:41:43 -05:00
🐛 Fix subactions toolbar positioning
This commit is contained in:
parent
1e9c6f3ebe
commit
51c2269c84
3 changed files with 12 additions and 3 deletions
|
@ -11,7 +11,8 @@
|
||||||
pointer-events: initial;
|
pointer-events: initial;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: $s-12;
|
top: $s-12;
|
||||||
left: calc(50% - 240px);
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: $s-56;
|
height: $s-56;
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
(let [edition (mf/deref refs/selected-edition)
|
(let [edition (mf/deref refs/selected-edition)
|
||||||
selected (mf/deref refs/selected-objects)
|
selected (mf/deref refs/selected-objects)
|
||||||
drawing (mf/deref refs/workspace-drawing)
|
drawing (mf/deref refs/workspace-drawing)
|
||||||
|
rulers? (mf/deref refs/rulers?)
|
||||||
drawing-obj (:object drawing)
|
drawing-obj (:object drawing)
|
||||||
shape (or drawing-obj (-> selected first))
|
shape (or drawing-obj (-> selected first))
|
||||||
|
|
||||||
|
@ -69,7 +70,7 @@
|
||||||
[:& view-only-actions]
|
[:& view-only-actions]
|
||||||
|
|
||||||
path-edition?
|
path-edition?
|
||||||
[:div {:class (stl/css :viewport-actions)}
|
[:div {:class (stl/css-case :viewport-actions true :viewport-actions-no-rulers (not rulers?))}
|
||||||
[:& path-actions {:shape shape}]]
|
[:& path-actions {:shape shape}]]
|
||||||
|
|
||||||
grid-edition?
|
grid-edition?
|
||||||
|
|
|
@ -9,7 +9,10 @@
|
||||||
.viewport-actions {
|
.viewport-actions {
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: $s-44;
|
--actions-toolbar-position-y: #{$s-28};
|
||||||
|
--actions-toolbar-offset-y: #{$s-6};
|
||||||
|
|
||||||
|
top: calc(var(--actions-toolbar-position-y) + var(--actions-toolbar-offset-y));
|
||||||
left: 50%;
|
left: 50%;
|
||||||
z-index: $z-index-20;
|
z-index: $z-index-20;
|
||||||
|
|
||||||
|
@ -47,3 +50,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.viewport-actions-no-rulers {
|
||||||
|
--actions-toolbar-position-y: 0px;
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue