From 6901431f8a3b5a084bf1a43265f2b29a8dafb83d Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Tue, 24 May 2022 22:44:44 +0200 Subject: [PATCH] :sparkles: Add debugging tool --- frontend/src/app/main/ui/workspace/viewport/hooks.cljs | 7 ++++++- frontend/src/debug.cljs | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/main/ui/workspace/viewport/hooks.cljs b/frontend/src/app/main/ui/workspace/viewport/hooks.cljs index 9f628336d..029e700ba 100644 --- a/frontend/src/app/main/ui/workspace/viewport/hooks.cljs +++ b/frontend/src/app/main/ui/workspace/viewport/hooks.cljs @@ -25,6 +25,7 @@ [app.util.globals :as globals] [app.util.timers :as timers] [beicon.core :as rx] + [debug :refer [debug?]] [goog.events :as events] [rumext.alpha :as mf]) (:import goog.events.EventType)) @@ -269,7 +270,11 @@ ;; We only allow active frames that are contained in the vbox (filter (partial inside-vbox vbox objects))) - all-frames)] + all-frames) + + ;; Debug only: Disable the thumbnails + new-active-frames + (if (debug? :disable-frame-thumbnails) (into #{} all-frames) new-active-frames)] (when (not= @active-frames new-active-frames) (reset! active-frames new-active-frames))))))) diff --git a/frontend/src/debug.cljs b/frontend/src/debug.cljs index 66ef857ee..8df6731c6 100644 --- a/frontend/src/debug.cljs +++ b/frontend/src/debug.cljs @@ -64,6 +64,9 @@ ;; Disable thumbnail cache :disable-thumbnail-cache + + ;; Disable frame thumbnails + :disable-frame-thumbnails }) ;; These events are excluded when we activate the :events flag