mirror of
https://github.com/penpot/penpot.git
synced 2025-01-26 08:29:42 -05:00
🐛 Fix problem with fix when scrolling
This commit is contained in:
parent
ce675097b1
commit
843a3f7f6e
2 changed files with 30 additions and 18 deletions
|
@ -113,24 +113,27 @@
|
|||
[:& (mf/provider shapes/base-frame-ctx) {:value base}
|
||||
[:& (mf/provider shapes/frame-offset-ctx) {:value offset}
|
||||
;; We have two different svgs for fixed and not fixed elements so we can emulate the sticky css attribute in svg
|
||||
[:svg.not-fixed {:view-box vbox
|
||||
:width (:width size)
|
||||
:height (:height size)
|
||||
:version "1.1"
|
||||
:xmlnsXlink "http://www.w3.org/1999/xlink"
|
||||
:xmlns "http://www.w3.org/2000/svg"
|
||||
:fill "none"}
|
||||
[:& wrapper-not-fixed {:shape frame :view-box vbox}]]
|
||||
[:svg.fixed {:view-box vbox
|
||||
:width (:width size)
|
||||
:height (:height size)
|
||||
:version "1.1"
|
||||
:xmlnsXlink "http://www.w3.org/1999/xlink"
|
||||
:xmlns "http://www.w3.org/2000/svg"
|
||||
:fill "none"
|
||||
:style {:width (:width size)
|
||||
:height (:height size)}}
|
||||
[:& wrapper-fixed {:shape fixed-frame :view-box vbox}]]]]))
|
||||
[:svg {:class (stl/css :fixed)
|
||||
:view-box vbox
|
||||
:width (:width size)
|
||||
:height (:height size)
|
||||
:version "1.1"
|
||||
:xmlnsXlink "http://www.w3.org/1999/xlink"
|
||||
:xmlns "http://www.w3.org/2000/svg"
|
||||
:fill "none"
|
||||
:style {:width (:width size)
|
||||
:height (:height size)}}
|
||||
[:& wrapper-fixed {:shape fixed-frame :view-box vbox}]]
|
||||
|
||||
[:svg {:class (stl/css :not-fixed)
|
||||
:view-box vbox
|
||||
:width (:width size)
|
||||
:height (:height size)
|
||||
:version "1.1"
|
||||
:xmlnsXlink "http://www.w3.org/1999/xlink"
|
||||
:xmlns "http://www.w3.org/2000/svg"
|
||||
:fill "none"}
|
||||
[:& wrapper-not-fixed {:shape frame :view-box vbox}]]]]))
|
||||
|
||||
(mf/defc viewport
|
||||
{::mf/wrap [mf/memo]
|
||||
|
|
|
@ -78,3 +78,12 @@
|
|||
}
|
||||
|
||||
// breakpoint 1013px
|
||||
|
||||
.fixed {
|
||||
position: fixed;
|
||||
pointer-events: none;
|
||||
|
||||
:global(.frame-children) g {
|
||||
pointer-events: auto;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue