mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 04:24:47 +02:00
Use Alt to clone entities on Mac
This commit is contained in:
parent
7db99cce6b
commit
5fb18566fe
1 changed files with 8 additions and 10 deletions
|
@ -2044,12 +2044,11 @@ SelectionDisplay = (function() {
|
||||||
Vec3.print(" pickResult.intersection", pickResult.intersection);
|
Vec3.print(" pickResult.intersection", pickResult.intersection);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Duplicate entities if Ctrl is pressed. This will make a
|
// Duplicate entities if Ctrl is pressed on Windows or Alt is press on Mac.
|
||||||
// copy of the selected entities and move the _original_ entities, not
|
// This will make a copy of the selected entities and move the _original_ entities, not the new ones.
|
||||||
// the new ones.
|
|
||||||
var isMac = Controller.getValue(Controller.Hardware.Application.PlatformMac);
|
var isMac = Controller.getValue(Controller.Hardware.Application.PlatformMac);
|
||||||
var isControl = isMac ? event.isMeta : event.isControl;
|
var isDuplicate = isMac ? event.isAlt : event.isControl;
|
||||||
if (isControl || doDuplicate) {
|
if (isDuplicate || doDuplicate) {
|
||||||
duplicatedEntityIDs = SelectionManager.duplicateSelection();
|
duplicatedEntityIDs = SelectionManager.duplicateSelection();
|
||||||
var ids = [];
|
var ids = [];
|
||||||
for (var i = 0; i < duplicatedEntityIDs.length; ++i) {
|
for (var i = 0; i < duplicatedEntityIDs.length; ++i) {
|
||||||
|
@ -2272,12 +2271,11 @@ SelectionDisplay = (function() {
|
||||||
addHandleTool(overlay, {
|
addHandleTool(overlay, {
|
||||||
mode: mode,
|
mode: mode,
|
||||||
onBegin: function(event, pickRay, pickResult) {
|
onBegin: function(event, pickRay, pickResult) {
|
||||||
// Duplicate entities if Ctrl is pressed. This will make a
|
// Duplicate entities if Ctrl is pressed on Windows or Alt is pressed on Mac.
|
||||||
// copy of the selected entities and move the _original_ entities, not
|
// This will make a copy of the selected entities and move the _original_ entities, not the new ones.
|
||||||
// the new ones.
|
|
||||||
var isMac = Controller.getValue(Controller.Hardware.Application.PlatformMac);
|
var isMac = Controller.getValue(Controller.Hardware.Application.PlatformMac);
|
||||||
var isControl = isMac ? event.isMeta : event.isControl;
|
var isDuplicate = isMac ? event.isAlt : event.isControl;
|
||||||
if (isControl) {
|
if (isDuplicate) {
|
||||||
duplicatedEntityIDs = SelectionManager.duplicateSelection();
|
duplicatedEntityIDs = SelectionManager.duplicateSelection();
|
||||||
var ids = [];
|
var ids = [];
|
||||||
for (var i = 0; i < duplicatedEntityIDs.length; ++i) {
|
for (var i = 0; i < duplicatedEntityIDs.length; ++i) {
|
||||||
|
|
Loading…
Reference in a new issue