mirror of
https://github.com/penpot/penpot.git
synced 2025-01-27 00:49:28 -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/base-frame-ctx) {:value base}
|
||||||
[:& (mf/provider shapes/frame-offset-ctx) {:value offset}
|
[:& (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
|
;; 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
|
[:svg {:class (stl/css :fixed)
|
||||||
:width (:width size)
|
:view-box vbox
|
||||||
:height (:height size)
|
:width (:width size)
|
||||||
:version "1.1"
|
:height (:height size)
|
||||||
:xmlnsXlink "http://www.w3.org/1999/xlink"
|
:version "1.1"
|
||||||
:xmlns "http://www.w3.org/2000/svg"
|
:xmlnsXlink "http://www.w3.org/1999/xlink"
|
||||||
:fill "none"}
|
:xmlns "http://www.w3.org/2000/svg"
|
||||||
[:& wrapper-not-fixed {:shape frame :view-box vbox}]]
|
:fill "none"
|
||||||
[:svg.fixed {:view-box vbox
|
:style {:width (:width size)
|
||||||
:width (:width size)
|
:height (:height size)}}
|
||||||
:height (:height size)
|
[:& wrapper-fixed {:shape fixed-frame :view-box vbox}]]
|
||||||
:version "1.1"
|
|
||||||
:xmlnsXlink "http://www.w3.org/1999/xlink"
|
[:svg {:class (stl/css :not-fixed)
|
||||||
:xmlns "http://www.w3.org/2000/svg"
|
:view-box vbox
|
||||||
:fill "none"
|
:width (:width size)
|
||||||
:style {:width (:width size)
|
:height (:height size)
|
||||||
:height (:height size)}}
|
:version "1.1"
|
||||||
[:& wrapper-fixed {:shape fixed-frame :view-box vbox}]]]]))
|
: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/defc viewport
|
||||||
{::mf/wrap [mf/memo]
|
{::mf/wrap [mf/memo]
|
||||||
|
|
|
@ -78,3 +78,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// breakpoint 1013px
|
// breakpoint 1013px
|
||||||
|
|
||||||
|
.fixed {
|
||||||
|
position: fixed;
|
||||||
|
pointer-events: none;
|
||||||
|
|
||||||
|
:global(.frame-children) g {
|
||||||
|
pointer-events: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue