mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 04:37:59 +02:00
Revert "Revert "edit.js adjustment""
This commit is contained in:
parent
e65ef93663
commit
fc68b31b71
2 changed files with 4 additions and 6 deletions
|
@ -260,7 +260,6 @@ var toolBar = (function () {
|
||||||
cameraManager.disable();
|
cameraManager.disable();
|
||||||
} else {
|
} else {
|
||||||
hasShownPropertiesTool = false;
|
hasShownPropertiesTool = false;
|
||||||
cameraManager.enable();
|
|
||||||
entityListTool.setVisible(true);
|
entityListTool.setVisible(true);
|
||||||
gridTool.setVisible(true);
|
gridTool.setVisible(true);
|
||||||
grid.setEnabled(true);
|
grid.setEnabled(true);
|
||||||
|
@ -670,15 +669,11 @@ function mouseMove(event) {
|
||||||
|
|
||||||
lastMousePosition = { x: event.x, y: event.y };
|
lastMousePosition = { x: event.x, y: event.y };
|
||||||
|
|
||||||
highlightEntityUnderCursor(lastMousePosition, false);
|
|
||||||
idleMouseTimerId = Script.setTimeout(handleIdleMouse, IDLE_MOUSE_TIMEOUT);
|
idleMouseTimerId = Script.setTimeout(handleIdleMouse, IDLE_MOUSE_TIMEOUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleIdleMouse() {
|
function handleIdleMouse() {
|
||||||
idleMouseTimerId = null;
|
idleMouseTimerId = null;
|
||||||
if (isActive) {
|
|
||||||
highlightEntityUnderCursor(lastMousePosition, true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function highlightEntityUnderCursor(position, accurateRay) {
|
function highlightEntityUnderCursor(position, accurateRay) {
|
||||||
|
@ -802,6 +797,7 @@ function mouseClickEvent(event) {
|
||||||
selectionDisplay.select(selectedEntityID, event);
|
selectionDisplay.select(selectedEntityID, event);
|
||||||
|
|
||||||
if (Menu.isOptionChecked(MENU_AUTO_FOCUS_ON_SELECT)) {
|
if (Menu.isOptionChecked(MENU_AUTO_FOCUS_ON_SELECT)) {
|
||||||
|
cameraManager.enable();
|
||||||
cameraManager.focus(selectionManager.worldPosition,
|
cameraManager.focus(selectionManager.worldPosition,
|
||||||
selectionManager.worldDimensions,
|
selectionManager.worldDimensions,
|
||||||
Menu.isOptionChecked(MENU_EASE_ON_FOCUS));
|
Menu.isOptionChecked(MENU_EASE_ON_FOCUS));
|
||||||
|
@ -1142,6 +1138,7 @@ Controller.keyReleaseEvent.connect(function (event) {
|
||||||
} else if (event.text == "f") {
|
} else if (event.text == "f") {
|
||||||
if (isActive) {
|
if (isActive) {
|
||||||
if (selectionManager.hasSelection()) {
|
if (selectionManager.hasSelection()) {
|
||||||
|
cameraManager.enable();
|
||||||
cameraManager.focus(selectionManager.worldPosition,
|
cameraManager.focus(selectionManager.worldPosition,
|
||||||
selectionManager.worldDimensions,
|
selectionManager.worldDimensions,
|
||||||
Menu.isOptionChecked(MENU_EASE_ON_FOCUS));
|
Menu.isOptionChecked(MENU_EASE_ON_FOCUS));
|
||||||
|
|
|
@ -49,7 +49,7 @@ EntityListTool = function(opts) {
|
||||||
|
|
||||||
var selectedIDs = [];
|
var selectedIDs = [];
|
||||||
for (var i = 0; i < selectionManager.selections.length; i++) {
|
for (var i = 0; i < selectionManager.selections.length; i++) {
|
||||||
selectedIDs.push(selectionManager.selections[i].id); // ?
|
selectedIDs.push(selectionManager.selections[i].id);
|
||||||
}
|
}
|
||||||
|
|
||||||
var data = {
|
var data = {
|
||||||
|
@ -70,6 +70,7 @@ EntityListTool = function(opts) {
|
||||||
}
|
}
|
||||||
selectionManager.setSelections(entityIDs);
|
selectionManager.setSelections(entityIDs);
|
||||||
if (data.focus) {
|
if (data.focus) {
|
||||||
|
cameraManager.enable();
|
||||||
cameraManager.focus(selectionManager.worldPosition,
|
cameraManager.focus(selectionManager.worldPosition,
|
||||||
selectionManager.worldDimensions,
|
selectionManager.worldDimensions,
|
||||||
Menu.isOptionChecked(MENU_EASE_ON_FOCUS));
|
Menu.isOptionChecked(MENU_EASE_ON_FOCUS));
|
||||||
|
|
Loading…
Reference in a new issue