diff --git a/frontend/src/app/main/ui/workspace/viewport.scss b/frontend/src/app/main/ui/workspace/viewport.scss index 647ce88a4b..be6d5f9d8b 100644 --- a/frontend/src/app/main/ui/workspace/viewport.scss +++ b/frontend/src/app/main/ui/workspace/viewport.scss @@ -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; - } } diff --git a/frontend/src/app/main/ui/workspace/viewport/pixel_overlay.cljs b/frontend/src/app/main/ui/workspace/viewport/pixel_overlay.cljs index b600551632..b97e9fd219 100644 --- a/frontend/src/app/main/ui/workspace/viewport/pixel_overlay.cljs +++ b/frontend/src/app/main/ui/workspace/viewport/pixel_overlay.cljs @@ -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}])) diff --git a/frontend/src/app/main/ui/workspace/viewport/pixel_overlay.scss b/frontend/src/app/main/ui/workspace/viewport/pixel_overlay.scss new file mode 100644 index 0000000000..fbbe82c72e --- /dev/null +++ b/frontend/src/app/main/ui/workspace/viewport/pixel_overlay.scss @@ -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; +}