mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 08:04:01 +02:00
Addressed CR of 9684
This commit is contained in:
parent
d9f86612de
commit
9c31f66b75
4 changed files with 9 additions and 5 deletions
|
@ -56,6 +56,7 @@ selectionManager.addEventListener(function () {
|
|||
lightOverlayManager.updatePositions();
|
||||
});
|
||||
|
||||
const KEY_P = 80; //Key code for letter p used for Parenting hotkey.
|
||||
var DEGREES_TO_RADIANS = Math.PI / 180.0;
|
||||
var RADIANS_TO_DEGREES = 180.0 / Math.PI;
|
||||
var epsilon = 0.001;
|
||||
|
@ -1406,7 +1407,7 @@ var keyReleaseEvent = function (event) {
|
|||
});
|
||||
grid.setPosition(newPosition);
|
||||
}
|
||||
} else if (event.key === 80 && event.isControl && !event.isAutoRepeat ) {
|
||||
} else if (event.key === KEY_P && event.isControl && !event.isAutoRepeat ) {
|
||||
if (event.isShifted) {
|
||||
unparentSelectedEntities();
|
||||
} else {
|
||||
|
|
|
@ -19,6 +19,7 @@ const VISIBLE_GLYPH = "";
|
|||
const TRANSPARENCY_GLYPH = "";
|
||||
const SCRIPT_GLYPH = "k";
|
||||
const DELETE = 46; // Key code for the delete key.
|
||||
const KEY_P = 80; // Key code for letter p used for Parenting hotkey.
|
||||
const MAX_ITEMS = Number.MAX_VALUE; // Used to set the max length of the list of discovered entities.
|
||||
|
||||
debugPrint = function (message) {
|
||||
|
@ -292,7 +293,7 @@ function loaded() {
|
|||
EventBridge.emitWebEvent(JSON.stringify({ type: 'delete' }));
|
||||
refreshEntities();
|
||||
}
|
||||
if (keyDownEvent.keyCode === 80 && keyDownEvent.ctrlKey) {
|
||||
if (keyDownEvent.keyCode === KEY_P && keyDownEvent.ctrlKey) {
|
||||
if (keyDownEvent.shiftKey) {
|
||||
EventBridge.emitWebEvent(JSON.stringify({ type: 'unparent' }));
|
||||
} else {
|
||||
|
|
|
@ -24,7 +24,7 @@ var ICON_FOR_TYPE = {
|
|||
}
|
||||
|
||||
var EDITOR_TIMEOUT_DURATION = 1500;
|
||||
|
||||
const KEY_P = 80; //Key code for letter p used for Parenting hotkey.
|
||||
var colorPickers = [];
|
||||
var lastEntityID = null;
|
||||
debugPrint = function(message) {
|
||||
|
@ -1442,7 +1442,7 @@ function loaded() {
|
|||
});
|
||||
|
||||
document.addEventListener("keydown", function (keyDown) {
|
||||
if (keyDown.keyCode === 80 && keyDown.ctrlKey) {
|
||||
if (keyDown.keyCode === KEY_P && keyDown.ctrlKey) {
|
||||
if (keyDown.shiftKey) {
|
||||
EventBridge.emitWebEvent(JSON.stringify({ type: 'unparent' }));
|
||||
} else {
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
|
||||
const KEY_P = 80; //Key code for letter p used for Parenting hotkey.
|
||||
|
||||
function loaded() {
|
||||
openEventBridge(function() {
|
||||
elPosY = document.getElementById("horiz-y");
|
||||
|
@ -132,7 +134,7 @@ function loaded() {
|
|||
EventBridge.emitWebEvent(JSON.stringify({ type: 'init' }));
|
||||
});
|
||||
document.addEventListener("keydown", function (keyDown) {
|
||||
if (keyDown.keyCode === 80 && keyDown.ctrlKey) {
|
||||
if (keyDown.keyCode === KEY_P && keyDown.ctrlKey) {
|
||||
if (keyDown.shiftKey) {
|
||||
EventBridge.emitWebEvent(JSON.stringify({ type: 'unparent' }));
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue