wrap selection print in wantDebug to avoid spamming logs in HMD

This commit is contained in:
Liv Erickson 2018-02-22 13:03:16 -08:00
parent 478ec48b63
commit 269d8312e2

View file

@ -814,13 +814,16 @@ function findClickedEntity(event) {
// Handles selections on overlays while in edit mode by querying entities from // Handles selections on overlays while in edit mode by querying entities from
// entityIconOverlayManager. // entityIconOverlayManager.
function handleOverlaySelectionToolUpdates(channel, message, sender) { function handleOverlaySelectionToolUpdates(channel, message, sender) {
var wantDebug = false;
if (sender !== MyAvatar.sessionUUID || channel !== 'entityToolUpdates') if (sender !== MyAvatar.sessionUUID || channel !== 'entityToolUpdates')
return; return;
var data = JSON.parse(message); var data = JSON.parse(message);
if (data.method === "selectOverlay") { if (data.method === "selectOverlay") {
print("setting selection to overlay " + data.overlayID); if (wantDebug) {
print("setting selection to overlay " + data.overlayID);
}
var entity = entityIconOverlayManager.findEntity(data.overlayID); var entity = entityIconOverlayManager.findEntity(data.overlayID);
if (entity !== null) { if (entity !== null) {