mirror of
https://github.com/penpot/penpot.git
synced 2025-02-10 00:58:26 -05:00
Improved rules positioning.
This commit is contained in:
parent
e6e7115e14
commit
5e8f741c2f
3 changed files with 9 additions and 14 deletions
|
@ -5,6 +5,7 @@
|
|||
overflow: scroll;
|
||||
width: 100%;
|
||||
transition: none;
|
||||
position: relative;
|
||||
|
||||
&.no-tool-bar-right {
|
||||
margin-right: 0;
|
||||
|
|
|
@ -72,12 +72,12 @@
|
|||
;; Pages management lightbox
|
||||
;; (pagesmngr)
|
||||
|
||||
;; Rules
|
||||
(h-rule left-sidebar?)
|
||||
(v-rule left-sidebar?)
|
||||
|
||||
;; Canvas
|
||||
[:section.workspace-canvas {:class classes :on-scroll on-scroll}
|
||||
;; Rules
|
||||
(h-rule left-sidebar?)
|
||||
(v-rule left-sidebar?)
|
||||
|
||||
(when (and (:selected workspace)
|
||||
(= (count (:selected workspace)) 1))
|
||||
(let [shape-id (first (:selected workspace))
|
||||
|
|
|
@ -95,13 +95,11 @@
|
|||
[own sidebar?]
|
||||
(let [width wb/viewport-width
|
||||
ticks (concat (range (- step-padding start-width) 0 step-size)
|
||||
(range 0 (- width start-width step-padding) step-size))
|
||||
padding (if sidebar? 250 0)]
|
||||
(range 0 (- width start-width step-padding) step-size))]
|
||||
(html
|
||||
[:svg.horizontal-rule
|
||||
{:width 3000
|
||||
:height 3000
|
||||
:style {:left (str padding "px")}}
|
||||
:height 3000}
|
||||
[:g
|
||||
[:rect {:x step-padding :y 0 :width width :height step-padding :fill "#bab7b7"}]
|
||||
[:rect {:x 0 :y 0 :width step-padding :height step-padding :fill "#bab7b7"}]]
|
||||
|
@ -120,15 +118,11 @@
|
|||
[own sidebar?]
|
||||
(let [height wb/viewport-height
|
||||
ticks (concat (range (- step-padding start-height) 0 step-size)
|
||||
(range 0 (- height start-height step-padding) step-size))
|
||||
padding (if sidebar?
|
||||
250
|
||||
0)]
|
||||
(range 0 (- height start-height step-padding) step-size))]
|
||||
(html
|
||||
[:svg.vertical-rule
|
||||
{:width 3000
|
||||
:height 3000
|
||||
:style {:left (str padding "px")}}
|
||||
:height 3000}
|
||||
[:g
|
||||
[:rect {:x 0 :y step-padding :height height :width step-padding :fill "#bab7b7"}]
|
||||
(for [tick ticks
|
||||
|
|
Loading…
Add table
Reference in a new issue