From ce3eb6cfee920f5e9feff965eb17b926dc90af9f Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Sun, 17 Apr 2016 00:11:15 -0400 Subject: [PATCH] Add Debug flags --- js/id/id.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/js/id/id.js b/js/id/id.js index 1c6921675..6ac892182 100644 --- a/js/id/id.js +++ b/js/id/id.js @@ -215,6 +215,20 @@ window.iD = function () { }; + /* Debug */ + var debugTile = false, debugCollision = false; + context.debugTile = function(_) { + if (!arguments.length) return debugTile; + debugTile = _; + return context; + }; + context.debugCollision = function(_) { + if (!arguments.length) return debugCollision; + debugCollision = _; + return context; + }; + + /* Presets */ var presets; context.presets = function(_) {