From c9b3f831c421f036fa2c25d91dc0b6c03469fea9 Mon Sep 17 00:00:00 2001
From: chrisgarrity <chrisg@media.mit.edu>
Date: Mon, 4 Feb 2019 11:34:34 +0100
Subject: [PATCH] Move blocks z-index up to match gui

Override the z-index for the blocks drag layer. At 1000, it will be over everything in the gui other than the navbar itself (monitors on the stage, tutorials, alerts, dropdown menus, etc.)
---
 src/components/blocks/blocks.css | 2 ++
 src/css/z-index.css              | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/components/blocks/blocks.css b/src/components/blocks/blocks.css
index fd66c68bd..583f587f7 100644
--- a/src/components/blocks/blocks.css
+++ b/src/components/blocks/blocks.css
@@ -1,5 +1,6 @@
 @import "../../css/units.css";
 @import "../../css/colors.css";
+@import "../../css/z-index.css";
 
 .blocks {
     height: 100%;
@@ -80,6 +81,7 @@
         This does not prevent user interaction on the blocks themselves.
     */
     pointer-events: none;
+    z-index: $z-index-drag-layer; /* make blocks match gui drag layer */
 }
 
 /*
diff --git a/src/css/z-index.css b/src/css/z-index.css
index 9f48b52aa..512469658 100644
--- a/src/css/z-index.css
+++ b/src/css/z-index.css
@@ -10,7 +10,6 @@ $z-index-stage-indicator: 45;
 $z-index-add-button: 46;
 $z-index-tooltip: 47; /* tooltips should go over add buttons if they overlap */
 $z-index-monitor: 48; /* monitors go over add buttons */
-/* Block drag z-index: 50; set in scratch-blocks */
 
 $z-index-card: 480;
 $z-index-alerts: 490;
@@ -19,6 +18,7 @@ $z-index-loader: 500;
 $z-index-modal: 510;
 
 $z-index-drag-layer: 1000;
+/* Block drag z-index: 1000; default 50 is overriden in blocks.css */
 $z-index-monitor-dragging: 1010;
 $z-index-dragging-sprite: 1020; /* so it is draggable into other panes */
 
-- 
GitLab