mirror of
https://github.com/penpot/penpot.git
synced 2025-02-18 21:06:11 -05:00
Merge pull request #5020 from penpot/eva-fix-color-picker
🐛 Fix color picker
This commit is contained in:
commit
5d97f4b924
3 changed files with 23 additions and 18 deletions
|
@ -36,14 +36,4 @@
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
|
|
||||||
.pixel-overlay {
|
|
||||||
left: 0;
|
|
||||||
pointer-events: initial;
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,9 @@
|
||||||
;; Copyright (c) KALEIDOS INC
|
;; Copyright (c) KALEIDOS INC
|
||||||
|
|
||||||
(ns app.main.ui.workspace.viewport.pixel-overlay
|
(ns app.main.ui.workspace.viewport.pixel-overlay
|
||||||
|
(:require-macros [app.main.style :as stl])
|
||||||
(:require
|
(:require
|
||||||
|
[app.common.data.macros :as dm]
|
||||||
[app.common.math :as mth]
|
[app.common.math :as mth]
|
||||||
[app.config :as cfg]
|
[app.config :as cfg]
|
||||||
[app.main.data.modal :as modal]
|
[app.main.data.modal :as modal]
|
||||||
|
@ -186,11 +188,9 @@
|
||||||
;; Disconnect on unmount
|
;; Disconnect on unmount
|
||||||
#(.disconnect observer))))
|
#(.disconnect observer))))
|
||||||
|
|
||||||
[:*
|
[:div {:id "pixel-overlay"
|
||||||
[:div.pixel-overlay
|
:tab-index 0
|
||||||
{:id "pixel-overlay"
|
:class (dm/str (cur/get-static "picker") " " (stl/css :pixel-overlay))
|
||||||
:tab-index 0
|
:on-pointer-down handle-pointer-down-picker
|
||||||
:class (cur/get-static "picker")
|
:on-pointer-up handle-pointer-up-picker
|
||||||
:on-pointer-down handle-pointer-down-picker
|
:on-pointer-move handle-pointer-move-picker}]))
|
||||||
:on-pointer-up handle-pointer-up-picker
|
|
||||||
:on-pointer-move handle-pointer-move-picker}]]))
|
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
//
|
||||||
|
// Copyright (c) KALEIDOS INC
|
||||||
|
|
||||||
|
.pixel-overlay {
|
||||||
|
left: 0;
|
||||||
|
pointer-events: initial;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue