From f563b8ca2ec479cc335b485aafa3e4a7d686c0a4 Mon Sep 17 00:00:00 2001 From: Liv Erickson Date: Fri, 5 Jan 2018 17:49:43 -0800 Subject: [PATCH] Make zones and lights not default grabbable --- scripts/system/edit.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/system/edit.js b/scripts/system/edit.js index e28f877d85..4ffccb3383 100644 --- a/scripts/system/edit.js +++ b/scripts/system/edit.js @@ -239,6 +239,7 @@ var toolBar = (function () { var dimensions = properties.dimensions ? properties.dimensions : DEFAULT_DIMENSIONS; var position = getPositionToCreateEntity(); var entityID = null; + if (position !== null && position !== undefined) { var direction; if (Camera.mode === "entity" || Camera.mode === "independent") { @@ -281,6 +282,12 @@ var toolBar = (function () { if (Menu.isOptionChecked(GRABBABLE_ENTITIES_MENU_ITEM)) { properties.userData = JSON.stringify({ grabbableKey: { grabbable: true } }); } + + if (properties.type === "Zone" || properties.type === "Light") { + properties.userData = JSON.stringify({ grabbableKey: { grabbable: false } }); + properties.dynamic = false; + } + entityID = Entities.addEntity(properties); if (properties.type === "ParticleEffect") {