mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 05:09:23 +02:00
Update property list window to only show after selection
This commit is contained in:
parent
559ec41bfe
commit
92fc08fa70
1 changed files with 10 additions and 3 deletions
|
@ -42,7 +42,15 @@ gridTool = GridTool({ horizontalGrid: grid });
|
||||||
Script.include("libraries/entityList.js");
|
Script.include("libraries/entityList.js");
|
||||||
var entityListTool = EntityListTool();
|
var entityListTool = EntityListTool();
|
||||||
|
|
||||||
selectionManager.addEventListener(selectionDisplay.updateHandles);
|
var hasShownPropertiesTool = false;
|
||||||
|
|
||||||
|
selectionManager.addEventListener(function() {
|
||||||
|
selectionDisplay.updateHandles();
|
||||||
|
if (selectionManager.hasSelection() && !hasShownPropertiesTool) {
|
||||||
|
propertiesTool.setVisible(true);
|
||||||
|
hasShownPropertiesTool = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
var windowDimensions = Controller.getViewportDimensions();
|
var windowDimensions = Controller.getViewportDimensions();
|
||||||
var toolIconUrl = HIFI_PUBLIC_BUCKET + "images/tools/";
|
var toolIconUrl = HIFI_PUBLIC_BUCKET + "images/tools/";
|
||||||
|
@ -223,10 +231,9 @@ var toolBar = (function () {
|
||||||
selectionManager.clearSelections();
|
selectionManager.clearSelections();
|
||||||
cameraManager.disable();
|
cameraManager.disable();
|
||||||
} else {
|
} else {
|
||||||
|
hasShownPropertiesTool = false;
|
||||||
cameraManager.enable();
|
cameraManager.enable();
|
||||||
entityListTool.setVisible(true);
|
|
||||||
gridTool.setVisible(true);
|
gridTool.setVisible(true);
|
||||||
propertiesTool.setVisible(true);
|
|
||||||
grid.setEnabled(true);
|
grid.setEnabled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue