0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-13 18:48:37 -05:00

Merge pull request #5020 from penpot/eva-fix-color-picker

🐛  Fix color picker
This commit is contained in:
Alejandro 2024-08-23 12:37:25 +02:00 committed by GitHub
commit 5d97f4b924
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 23 additions and 18 deletions

View file

@ -36,14 +36,4 @@
bottom: 0;
right: 0;
z-index: 10;
.pixel-overlay {
left: 0;
pointer-events: initial;
position: absolute;
top: 0;
right: 0;
bottom: 0;
z-index: 1;
}
}

View file

@ -5,7 +5,9 @@
;; Copyright (c) KALEIDOS INC
(ns app.main.ui.workspace.viewport.pixel-overlay
(:require-macros [app.main.style :as stl])
(:require
[app.common.data.macros :as dm]
[app.common.math :as mth]
[app.config :as cfg]
[app.main.data.modal :as modal]
@ -186,11 +188,9 @@
;; Disconnect on unmount
#(.disconnect observer))))
[:*
[:div.pixel-overlay
{:id "pixel-overlay"
:tab-index 0
:class (cur/get-static "picker")
:on-pointer-down handle-pointer-down-picker
:on-pointer-up handle-pointer-up-picker
:on-pointer-move handle-pointer-move-picker}]]))
[:div {:id "pixel-overlay"
:tab-index 0
:class (dm/str (cur/get-static "picker") " " (stl/css :pixel-overlay))
:on-pointer-down handle-pointer-down-picker
:on-pointer-up handle-pointer-up-picker
:on-pointer-move handle-pointer-move-picker}]))

View file

@ -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;
}