From d37c70d5ae6582d2e979455f81e029962076b102 Mon Sep 17 00:00:00 2001 From: Tim Martin Date: Mon, 15 Jan 2018 13:30:05 -0500 Subject: [PATCH] Fix for debugging non-renderable components --- src/debug/debug-layer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/debug/debug-layer.js b/src/debug/debug-layer.js index 4e541f9f..ce5affaa 100644 --- a/src/debug/debug-layer.js +++ b/src/debug/debug-layer.js @@ -454,7 +454,7 @@ Crafty.DebugCanvas = { current = q[i]; // If necessary, update the view transform to match the current entities layer - if (lastLayer !== current._drawlayer){ + if (current._drawLayer && lastLayer !== current._drawLayer){ view = current._drawLayer._viewportRect(); ctx.setTransform(view._scale, 0, 0, view._scale, Math.round(-view._x*view._scale), Math.round(-view._y*view._scale)); lastLayer = current._drawLayer;