From 5786789a665f4e271084131f1a0124b47ada99f0 Mon Sep 17 00:00:00 2001 From: "James B. Pollack" Date: Mon, 28 Dec 2015 15:12:29 -0800 Subject: [PATCH] cleanup cleanup --- examples/light_modifier/lightModifier.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/light_modifier/lightModifier.js b/examples/light_modifier/lightModifier.js index 08271fa7a8..eff373d3d7 100644 --- a/examples/light_modifier/lightModifier.js +++ b/examples/light_modifier/lightModifier.js @@ -636,7 +636,7 @@ function createCloseButton(axisStart) { modelURL: CLOSE_BUTTON_MODEL_URL, dimensions: CLOSE_BUTTON_DIMENSIONS, position: Vec3.sum(position, VERTICAL_OFFFSET), - rotation: Quat.multiply(avatarRot,Quat.fromPitchYawRollDegrees(90, 0, 45)), + rotation: Quat.multiply(avatarRot, Quat.fromPitchYawRollDegrees(90, 0, 45)), //rotation: Quat.fromPitchYawRollDegrees(0, 0, 90), collisionsWillMove: false, ignoreForCollisions: true, @@ -652,8 +652,8 @@ function createCloseButton(axisStart) { closeButtons.push(button); - if(ROTATE_CLOSE_BUTTON===true){ - Script.update.connect(rotateCloseButtons); + if (ROTATE_CLOSE_BUTTON === true) { + Script.update.connect(rotateCloseButtons); } } @@ -742,7 +742,7 @@ function handleLightOverlayRayCheckMessages(channel, message, sender) { var lightID = doesIntersect.entityID; if (currentLight === lightID) { - // print('ALREADY HAVE A BLOCK, EXIT') + // print('ALREADY HAVE A BLOCK, EXIT') return; } @@ -833,17 +833,17 @@ function cleanup(fromMessage) { Entities.deleteEntity(panel); Entities.deleteEntity(visiblePanel); - var data = { - action: 'remove', - id: visiblePanel - }; - Messages.sendMessage('Hifi-Hand-RayPick-Blacklist', JSON.stringify(data)) selectionManager.clearSelections(); - Script.update.disconnect(rotateCloseButtons); + + if (ROTATE_CLOSE_BUTTON === true) { + Script.update.disconnect(rotateCloseButtons); + } + if (hasParent === false) { Entities.deleteEntity(block); } + oldParent = null; hasParent = false; currentLight = null;