From b7933788301995cc58579988e5939f73193fc618 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Wed, 4 Nov 2020 23:12:04 -0500 Subject: [PATCH 01/21] Undo-redo for "Move Selected Entities to Avatar" This adds the undo/redo to the action "Move Selected Entities to Avatar". The action is now recorded in the undo history. --- scripts/system/create/entitySelectionTool/entitySelectionTool.js | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/system/create/entitySelectionTool/entitySelectionTool.js b/scripts/system/create/entitySelectionTool/entitySelectionTool.js index ffa828affe..97e36d818e 100644 --- a/scripts/system/create/entitySelectionTool/entitySelectionTool.js +++ b/scripts/system/create/entitySelectionTool/entitySelectionTool.js @@ -668,6 +668,7 @@ SelectionManager = (function() { var newPosition = Vec3.sum(relativePosition, targetPosition); Entities.editEntity(id, { "position": newPosition }); } + pushCommandForSelections(); that._update(false, this); } else { audioFeedback.rejection(); From 1cf0e2c00a6c75f3a3fa263932e24bdb7922a29f Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Wed, 4 Nov 2020 23:23:29 -0500 Subject: [PATCH 02/21] "Teleport to Selected Entities" to Actions menu This moves "Teleport to Selected Entities" from "Selection" to "Actions" menu. --- .../create/entityList/html/entityList.html | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/scripts/system/create/entityList/html/entityList.html b/scripts/system/create/entityList/html/entityList.html index b22cd87a65..b3a354fdda 100644 --- a/scripts/system/create/entityList/html/entityList.html +++ b/scripts/system/create/entityList/html/entityList.html @@ -154,7 +154,13 @@ - + +
- - - + From dcb1493eaf4e265b552fd1dc21db5b5011230f9e Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Thu, 5 Nov 2020 21:49:22 -0500 Subject: [PATCH 03/21] Rename "Select Family" This renames: "Select Family" for "Select Parent And All Its Children" "Select Top Family" for "Select Top Parent And All Its Children" --- scripts/system/create/entityList/html/entityList.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/system/create/entityList/html/entityList.html b/scripts/system/create/entityList/html/entityList.html index b3a354fdda..87f7f535d6 100644 --- a/scripts/system/create/entityList/html/entityList.html +++ b/scripts/system/create/entityList/html/entityList.html @@ -215,13 +215,13 @@ From ac46e9a4929f77e7837a0ef2ceab83f06474116d Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Mon, 9 Nov 2020 00:28:54 -0500 Subject: [PATCH 04/21] Remove uppercase from Create App List header Remove uppercase from Create App List header The columns headers were forced to be displayed in uppercase This was causing the wrong icon to be displayed for some columns like "script". Uppercase wasn't necessary, the header was looking overloaded when many columns are displayed. --- scripts/system/html/css/edit-style.css | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/system/html/css/edit-style.css b/scripts/system/html/css/edit-style.css index 1f1fb9c86a..14cfe5e431 100644 --- a/scripts/system/html/css/edit-style.css +++ b/scripts/system/html/css/edit-style.css @@ -109,7 +109,6 @@ table { thead { font-family: Raleway-Regular; font-size: 12px; - text-transform: uppercase; background-color: #1c1c1c; padding: 1px 0; border-bottom: 1px solid #575757; From c573242043ab3ca921d2d308d7d0fef71cd06c59 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Mon, 9 Nov 2020 00:31:48 -0500 Subject: [PATCH 05/21] Add Setting name to persist the columns setup Add a Setting name to persist the columns' visibility and ordering. --- scripts/system/create/edit.js | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/system/create/edit.js b/scripts/system/create/edit.js index 69e2e94818..cd987140d8 100644 --- a/scripts/system/create/edit.js +++ b/scripts/system/create/edit.js @@ -160,6 +160,7 @@ var SETTING_AUTO_FOCUS_ON_SELECT = "autoFocusOnSelect"; var SETTING_EASE_ON_FOCUS = "cameraEaseOnFocus"; var SETTING_SHOW_LIGHTS_AND_PARTICLES_IN_EDIT_MODE = "showLightsAndParticlesInEditMode"; var SETTING_SHOW_ZONES_IN_EDIT_MODE = "showZonesInEditMode"; +var SETTING_EDITOR_COLUMNS_SETUP = "editorColumnsSetup"; var SETTING_EDIT_PREFIX = "Edit/"; From f3dea2fbad55082cb1d0176dfde177f7e0e4036f Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Mon, 9 Nov 2020 00:34:07 -0500 Subject: [PATCH 06/21] Add the persistence of the columns setup Add the persistence of the columns' visibility and ordering. --- scripts/system/create/entityList/entityList.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/system/create/entityList/entityList.js b/scripts/system/create/entityList/entityList.js index 252481d44d..d8930ebc2d 100644 --- a/scripts/system/create/entityList/entityList.js +++ b/scripts/system/create/entityList/entityList.js @@ -371,6 +371,14 @@ EntityListTool = function(shouldUseEditTabletApp) { SelectionManager.teleportToEntity(); } else if (data.type === 'moveEntitySelectionToAvatar') { SelectionManager.moveEntitiesSelectionToAvatar(); + } else if (data.type === 'loadColumnsConfigSetting') { + var columnsData = Settings.getValue(SETTING_EDIT_PREFIX + SETTING_EDITOR_COLUMNS_SETUP, "NO_DATA"); + emitJSONScriptEvent({ + "type": "loadedColumnsSetup", + "columnsData": columnsData + }); + } else if (data.type === 'saveColumnsConfigSetting') { + Settings.setValue(SETTING_EDIT_PREFIX + SETTING_EDITOR_COLUMNS_SETUP, data.columnsData); } }; From 233d68952a928f9395a4d02ac907df6a8ea84ca4 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Mon, 9 Nov 2020 00:35:13 -0500 Subject: [PATCH 07/21] Add the persistence of the columns setup Add the persistence of the columns' visibility and ordering. --- .../create/entityList/html/js/entityList.js | 62 +++++++++++++++++-- 1 file changed, 57 insertions(+), 5 deletions(-) diff --git a/scripts/system/create/entityList/html/js/entityList.js b/scripts/system/create/entityList/html/js/entityList.js index be79593511..3ff8328132 100644 --- a/scripts/system/create/entityList/html/js/entityList.js +++ b/scripts/system/create/entityList/html/js/entityList.js @@ -20,7 +20,7 @@ const EMPTY_ENTITY_ID = "0"; const MAX_LENGTH_RADIUS = 9; const MINIMUM_COLUMN_WIDTH = 24; const SCROLLBAR_WIDTH = 20; -const RESIZER_WIDTH = 10; +const RESIZER_WIDTH = 13; //Must be the number of COLUMNS - 1. const DELTA_X_MOVE_COLUMNS_THRESHOLD = 2; const DELTA_X_COLUMN_SWAP_POSITION = 5; const CERTIFIED_PLACEHOLDER = "** Certified **"; @@ -283,6 +283,9 @@ const PROFILE = !ENABLE_PROFILING ? PROFILE_NOOP : function(name, fn, args) { function loaded() { openEventBridge(function() { + + var isColumnsSettingLoaded = false; + elEntityTable = document.getElementById("entity-table"); elEntityTableHeader = document.getElementById("entity-table-header"); elEntityTableBody = document.getElementById("entity-table-body"); @@ -331,7 +334,7 @@ function loaded() { elColumnsMultiselectBox = document.getElementById("entity-table-columns-multiselect-box"); elColumnsOptions = document.getElementById("entity-table-columns-options"); elToggleSpaceMode = document.getElementById('toggle-space-mode'); - + document.body.onclick = onBodyClick; elToggleLocked.onclick = function() { EventBridge.emitWebEvent(JSON.stringify({ type: 'toggleLocked' })); @@ -618,9 +621,9 @@ function loaded() { ++columnIndex; } - + elEntityTableHeaderRow = document.querySelectorAll("#entity-table thead th"); - + entityList = new ListView(elEntityTableBody, elEntityTableScroll, elEntityTableHeaderRow, createRow, updateRow, clearRow, preRefresh, postRefresh, preRefresh, WINDOW_NONVARIABLE_HEIGHT); @@ -1409,6 +1412,10 @@ function loaded() { column.elResizer.style.visibility = columnVisible && visibleColumns > 0 ? "visible" : "hidden"; } + if (isColumnsSettingLoaded) { + EventBridge.emitWebEvent(JSON.stringify({ type: 'saveColumnsConfigSetting', columnsData: columns })); + } + entityList.refresh(); } @@ -1660,14 +1667,59 @@ function loaded() { } else { document.getElementById("hmdmultiselect").style.display = "none"; } + } else if (data.type === "loadedColumnsSetup") { + if (data.columnsData !== "NO_DATA" && typeof(data.columnsData) === "object") { + var isValid = true; + var originalColumnIDs = []; + for (let originalColumnID in COLUMNS) { + originalColumnIDs.push(originalColumnID); + } + for (let columnSetupIndex in data.columnsData) { + var checkPresence = originalColumnIDs.indexOf(data.columnsData[columnSetupIndex].columnID); + if (checkPresence === -1) { + isValid = false; + break; + } + } + if (isValid) { + for (var columnIndex = 0; columnIndex < data.columnsData.length; columnIndex++) { + if (data.columnsData[columnIndex].data.alwaysShown !== true) { + var columnDropdownID = "entity-table-column-" + data.columnsData[columnIndex].columnID; + if (data.columnsData[columnIndex].width !== 0) { + document.getElementById(columnDropdownID).checked = false; + document.getElementById(columnDropdownID).click(); + } else { + document.getElementById(columnDropdownID).checked = true; + document.getElementById(columnDropdownID).click(); + } + } + } + for (columnIndex = 0; columnIndex < data.columnsData.length; columnIndex++) { + let currentColumnIndex = originalColumnIDs.indexOf(data.columnsData[columnIndex].columnID); + if (currentColumnIndex !== -1 && columnIndex !== currentColumnIndex) { + for (var i = currentColumnIndex; i > columnIndex; i--) { + swapColumns(i-1, i); + var swappedContent = originalColumnIDs[i-1]; + originalColumnIDs[i-1] = originalColumnIDs[i]; + originalColumnIDs[i] = swappedContent; + } + } + } + } else { + EventBridge.emitWebEvent(JSON.stringify({ type: 'saveColumnsConfigSetting', columnsData: "" })); + } + } + isColumnsSettingLoaded = true; } }); } - + refreshSortOrder(); refreshEntities(); window.addEventListener("resize", updateColumnWidths); + + EventBridge.emitWebEvent(JSON.stringify({ type: 'loadColumnsConfigSetting' })); }); augmentSpinButtons(); From 44db0bb866b724329e853c686160d2772a274dcf Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Mon, 9 Nov 2020 22:02:42 -0500 Subject: [PATCH 08/21] Add selection color Parent & Child entities Add in-world selection color for entities that are Parent & Child at the same time. When 1 entity is selected (in-world): if the entity is a Top Parent, the selection color of the bounding box is Orange. if the entity is Parent and Child, the selection color of the bounding box is Majenta. if the entity is only a Child, then the selection color of the bounding box is Cyan. If not involved in any parent line, or if the selection is multiple, then the selection color of the bounding box is Light Grey. --- .../create/entitySelectionTool/entitySelectionTool.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/system/create/entitySelectionTool/entitySelectionTool.js b/scripts/system/create/entitySelectionTool/entitySelectionTool.js index 97e36d818e..71edbde765 100644 --- a/scripts/system/create/entitySelectionTool/entitySelectionTool.js +++ b/scripts/system/create/entitySelectionTool/entitySelectionTool.js @@ -798,6 +798,7 @@ SelectionDisplay = (function() { const COLOR_ROTATE_CURRENT_RING = { red: 255, green: 99, blue: 9 }; const COLOR_BOUNDING_EDGE = { red: 160, green: 160, blue: 160 }; const COLOR_BOUNDING_EDGE_PARENT = { red: 194, green: 123, blue: 0 }; + const COLOR_BOUNDING_EDGE_PARENT_AND_CHILDREN = { red: 179, green: 0, blue: 134 }; const COLOR_BOUNDING_EDGE_CHILDREN = { red: 0, green: 168, blue: 214 }; const COLOR_SCALE_CUBE = { red: 192, green: 192, blue: 192 }; const COLOR_DEBUG_PICK_PLANE = { red: 255, green: 255, blue: 255 }; @@ -1934,10 +1935,10 @@ SelectionDisplay = (function() { var parentState = getParentState(SelectionManager.selections[0]); if (parentState === "CHILDREN") { handleBoundingBoxColor = COLOR_BOUNDING_EDGE_CHILDREN; - } else { - if (parentState === "PARENT" || parentState === "PARENT_CHILDREN") { - handleBoundingBoxColor = COLOR_BOUNDING_EDGE_PARENT; - } + } else if (parentState === "PARENT") { + handleBoundingBoxColor = COLOR_BOUNDING_EDGE_PARENT; + } else if (parentState === "PARENT_CHILDREN") { + handleBoundingBoxColor = COLOR_BOUNDING_EDGE_PARENT_AND_CHILDREN; } } From fc40a401d70416f6cc4329a9daeca506c2d3ddcb Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Mon, 9 Nov 2020 22:37:33 -0500 Subject: [PATCH 09/21] Selection and Actions menu close with the window Bug fixed: The "Selection" and "Actions" menu now close when we close the Entity list window or the Create App. --- scripts/system/create/entityList/html/js/entityList.js | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/system/create/entityList/html/js/entityList.js b/scripts/system/create/entityList/html/js/entityList.js index 3ff8328132..aa23784eea 100644 --- a/scripts/system/create/entityList/html/js/entityList.js +++ b/scripts/system/create/entityList/html/js/entityList.js @@ -1735,6 +1735,7 @@ function loaded() { // close context menu when switching focus to another window $(window).blur(function() { entityListContextMenu.close(); + closeAllEntityListMenu(); }); function closeAllEntityListMenu() { From 9c48acf1d332832234b897a996e05616351c4b9c Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Mon, 9 Nov 2020 23:54:39 -0500 Subject: [PATCH 10/21] Add style for last-selected Add style for last-selected --- scripts/system/html/css/edit-style.css | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/system/html/css/edit-style.css b/scripts/system/html/css/edit-style.css index 14cfe5e431..4f0a833a13 100644 --- a/scripts/system/html/css/edit-style.css +++ b/scripts/system/html/css/edit-style.css @@ -183,6 +183,15 @@ tr.selected + tr.selected { border-top: 1px solid #2e2e2e; } +tr.last-selected { + color: #000000; + background-color: #0064ef; +} + +tr.last-selected + tr.last-selected { + border-top: 1px solid #2e2e2e; +} + th { text-align: center; word-wrap: nowrap; From fb516cf13c0f36cbab2d27ad49e1f6a9403f957f Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Tue, 10 Nov 2020 00:01:15 -0500 Subject: [PATCH 11/21] Highlight the last selected entity in the List The last selected entity is now displayed in darker blue in the list (if present per radius search) This makes clear which entity could become the parent. (This enlights some weird behavior with the Selection, making this hazardous to figure which one was the true last selected entity. To be addressed later, it's already better now.) --- .../create/entityList/html/js/entityList.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/scripts/system/create/entityList/html/js/entityList.js b/scripts/system/create/entityList/html/js/entityList.js index aa23784eea..c0b28532cb 100644 --- a/scripts/system/create/entityList/html/js/entityList.js +++ b/scripts/system/create/entityList/html/js/entityList.js @@ -188,6 +188,8 @@ let selectedEntities = []; let entityList = null; // The ListView let hmdMultiSelectMode = false; + +let lastSelectedEntity; /** * @type EntityListContextMenu */ @@ -1047,6 +1049,8 @@ function loaded() { function updateSelectedEntities(selectedIDs, autoScroll) { let notFound = false; + lastSelectedEntity = selectedIDs[selectedIDs.length - 1]; + // reset all currently selected entities and their rows first selectedEntities.forEach(function(id) { let entity = entitiesByID[id]; @@ -1066,7 +1070,11 @@ function loaded() { if (entity !== undefined) { entity.selected = true; if (entity.elRow) { - entity.elRow.className = 'selected'; + if (id === lastSelectedEntity) { + entity.elRow.className = 'last-selected'; + } else { + entity.elRow.className = 'selected'; + } } } else { notFound = true; @@ -1135,7 +1143,11 @@ function loaded() { // if this entity was previously selected flag it's row as selected if (itemData.selected) { - elRow.className = 'selected'; + if (itemData.id === lastSelectedEntity) { + elRow.className = 'last-selected'; + } else { + elRow.className = 'selected'; + } } else { elRow.className = ''; } From 1167ce7a1c9094823ad4045f80da9cdf4bd0b417 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Tue, 10 Nov 2020 21:56:44 -0500 Subject: [PATCH 12/21] "Teleport To Selected Entities" back to Selection This returns "Teleport To Selected Entities" back to the "Selection..." menu. After having tried a certain time what was suggested (having it under "Actions..." menu) This is clearly easy to confuse it with "Move Selected Entities to Avatar" "Teleport To Selected Entities" is about position your-self to see what you have "Selected" (which make this a Selection Tools or an assistant to it) while "Move Selected Entities to Avatar" is clearly an action. as it moves the entities to a new position. --- .../system/create/entityList/html/entityList.html | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/scripts/system/create/entityList/html/entityList.html b/scripts/system/create/entityList/html/entityList.html index 87f7f535d6..63e774c787 100644 --- a/scripts/system/create/entityList/html/entityList.html +++ b/scripts/system/create/entityList/html/entityList.html @@ -155,12 +155,6 @@ -
+ + From 38e15b62085f8528fd4012aeba4127585379a335 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Tue, 10 Nov 2020 22:51:32 -0500 Subject: [PATCH 13/21] Bug fix: CTRL-Click was inverting the selection. Bug fix: EntityList, CTRL-Click was adding the last selected entity as the first selection the selection stack. The first selected item was systematically the last item of the selection. This was causing unpredictable results with "Parent Entities To The Last Selected". (This bug becomes evident by highlighting the "Last Selected" in the entity list. --- scripts/system/create/entityList/html/js/entityList.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/system/create/entityList/html/js/entityList.js b/scripts/system/create/entityList/html/js/entityList.js index c0b28532cb..bb84f35d6d 100644 --- a/scripts/system/create/entityList/html/js/entityList.js +++ b/scripts/system/create/entityList/html/js/entityList.js @@ -770,10 +770,10 @@ function loaded() { let selectedIndex = selectedEntities.indexOf(entityID); if (selectedIndex >= 0) { selection = []; - selection = selection.concat(selectedEntities); + selection = selectedEntities.concat(selection); selection.splice(selectedIndex, 1); } else { - selection = selection.concat(selectedEntities); + selection = selectedEntities.concat(selection); } } else if (clickEvent.shiftKey && selectedEntities.length > 0) { let previousItemFound = -1; From 428db065b548ddff807467b574708702840f87a8 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Wed, 11 Nov 2020 23:41:31 -0500 Subject: [PATCH 14/21] User Preference: Entity List Default Radius Add a new User Preference for the Default value of the Entity List Radius. This is available in the Edit menu. If changed, this value will be used as default Radius for the next time the script will be loaded. --- scripts/system/create/entityList/html/js/entityList.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/system/create/entityList/html/js/entityList.js b/scripts/system/create/entityList/html/js/entityList.js index bb84f35d6d..c8e09e2b37 100644 --- a/scripts/system/create/entityList/html/js/entityList.js +++ b/scripts/system/create/entityList/html/js/entityList.js @@ -1679,7 +1679,11 @@ function loaded() { } else { document.getElementById("hmdmultiselect").style.display = "none"; } - } else if (data.type === "loadedColumnsSetup") { + } else if (data.type === "loadedConfigSetting") { + if (typeof(data.defaultRadius) === "number") { + elFilterRadius.value = data.defaultRadius; + onRadiusChange(); + } if (data.columnsData !== "NO_DATA" && typeof(data.columnsData) === "object") { var isValid = true; var originalColumnIDs = []; @@ -1731,7 +1735,7 @@ function loaded() { window.addEventListener("resize", updateColumnWidths); - EventBridge.emitWebEvent(JSON.stringify({ type: 'loadColumnsConfigSetting' })); + EventBridge.emitWebEvent(JSON.stringify({ type: 'loadConfigSetting' })); }); augmentSpinButtons(); From f22c7be72e9dba95cb452af5c984b613b1241417 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Wed, 11 Nov 2020 23:42:29 -0500 Subject: [PATCH 15/21] User Preference: Entity List Default Radius Add a new User Preference for the Default value of the Entity List Radius. This is available in the Edit menu. If changed, this value will be used as default Radius for the next time the script will be loaded. --- scripts/system/create/entityList/entityList.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/system/create/entityList/entityList.js b/scripts/system/create/entityList/entityList.js index d8930ebc2d..58cf4ce892 100644 --- a/scripts/system/create/entityList/entityList.js +++ b/scripts/system/create/entityList/entityList.js @@ -371,14 +371,16 @@ EntityListTool = function(shouldUseEditTabletApp) { SelectionManager.teleportToEntity(); } else if (data.type === 'moveEntitySelectionToAvatar') { SelectionManager.moveEntitiesSelectionToAvatar(); - } else if (data.type === 'loadColumnsConfigSetting') { - var columnsData = Settings.getValue(SETTING_EDIT_PREFIX + SETTING_EDITOR_COLUMNS_SETUP, "NO_DATA"); + } else if (data.type === 'loadConfigSetting') { + var columnsData = Settings.getValue(SETTING_EDITOR_COLUMNS_SETUP, "NO_DATA"); + var defaultRadius = Settings.getValue(SETTING_ENTITY_LIST_DEFAULT_RADIUS, 100); emitJSONScriptEvent({ - "type": "loadedColumnsSetup", - "columnsData": columnsData + "type": "loadedConfigSetting", + "columnsData": columnsData, + "defaultRadius": defaultRadius }); } else if (data.type === 'saveColumnsConfigSetting') { - Settings.setValue(SETTING_EDIT_PREFIX + SETTING_EDITOR_COLUMNS_SETUP, data.columnsData); + Settings.setValue(SETTING_EDITOR_COLUMNS_SETUP, data.columnsData); } }; From 7bec7cbaa1adceb28a7173fd5429f6a6d99af80e Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Wed, 11 Nov 2020 23:43:49 -0500 Subject: [PATCH 16/21] User Preference: Entity List Default Radius Add a new User Preference for the Default value of the Entity List Radius. This is available in the Edit menu. If changed, this value will be used as default Radius for the next time the script will be loaded. --- scripts/system/create/edit.js | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/scripts/system/create/edit.js b/scripts/system/create/edit.js index cd987140d8..a457b62fe6 100644 --- a/scripts/system/create/edit.js +++ b/scripts/system/create/edit.js @@ -155,12 +155,14 @@ var MENU_CREATE_ENTITIES_GRABBABLE = "Create Entities As Grabbable (except Zones var MENU_ALLOW_SELECTION_LARGE = "Allow Selecting of Large Models"; var MENU_ALLOW_SELECTION_SMALL = "Allow Selecting of Small Models"; var MENU_ALLOW_SELECTION_LIGHTS = "Allow Selecting of Lights"; +var MENU_ENTITY_LIST_DEFAULT_RADIUS = "Entity List Default Radius"; var SETTING_AUTO_FOCUS_ON_SELECT = "autoFocusOnSelect"; var SETTING_EASE_ON_FOCUS = "cameraEaseOnFocus"; var SETTING_SHOW_LIGHTS_AND_PARTICLES_IN_EDIT_MODE = "showLightsAndParticlesInEditMode"; var SETTING_SHOW_ZONES_IN_EDIT_MODE = "showZonesInEditMode"; var SETTING_EDITOR_COLUMNS_SETUP = "editorColumnsSetup"; +var SETTING_ENTITY_LIST_DEFAULT_RADIUS = "entityListDefaultRadius"; var SETTING_EDIT_PREFIX = "Edit/"; @@ -1509,6 +1511,11 @@ function setupModelMenus() { isCheckable: true, isChecked: Settings.getValue(SETTING_SHOW_ZONES_IN_EDIT_MODE) !== "false" }); + Menu.addMenuItem({ + menuName: "Edit", + menuItemName: MENU_ENTITY_LIST_DEFAULT_RADIUS, + afterItem: MENU_SHOW_ZONES_IN_EDIT_MODE + }); Entities.setLightsArePickable(false); } @@ -1542,6 +1549,7 @@ function cleanupModelMenus() { Menu.removeMenuItem("Edit", MENU_SHOW_LIGHTS_AND_PARTICLES_IN_EDIT_MODE); Menu.removeMenuItem("Edit", MENU_SHOW_ZONES_IN_EDIT_MODE); Menu.removeMenuItem("Edit", MENU_CREATE_ENTITIES_GRABBABLE); + Menu.removeMenuItem("Edit", MENU_ENTITY_LIST_DEFAULT_RADIUS); } Script.scriptEnding.connect(function () { @@ -1882,6 +1890,17 @@ function onPromptTextChanged(prompt) { } } +function onPromptTextChangedDefaultRadiusUserPref(prompt) { + Window.promptTextChanged.disconnect(onPromptTextChangedDefaultRadiusUserPref); + if (prompt !== "") { + var radius = parseInt(prompt); + if (radius < 0 || isNaN(radius)){ + radius = 100; + } + Settings.setValue(SETTING_ENTITY_LIST_DEFAULT_RADIUS, radius); + } +} + function handleMenuEvent(menuItem) { if (menuItem === "Allow Selecting of Small Models") { allowSmallModels = Menu.isOptionChecked("Allow Selecting of Small Models"); @@ -1912,7 +1931,7 @@ function handleMenuEvent(menuItem) { Window.browseAsync("Select Model to Import", "", "*.json"); } else { Window.promptTextChanged.connect(onPromptTextChanged); - Window.promptAsync("URL of SVO to import", ""); + Window.promptAsync("URL of a .json to import", ""); } } else if (menuItem === "Select All Entities In Box") { selectAllEntitiesInCurrentSelectionBox(false); @@ -1924,6 +1943,9 @@ function handleMenuEvent(menuItem) { Entities.setDrawZoneBoundaries(isActive && Menu.isOptionChecked(MENU_SHOW_ZONES_IN_EDIT_MODE)); } else if (menuItem === MENU_CREATE_ENTITIES_GRABBABLE) { Settings.setValue(SETTING_EDIT_PREFIX + menuItem, Menu.isOptionChecked(menuItem)); + } else if (menuItem === MENU_ENTITY_LIST_DEFAULT_RADIUS) { + Window.promptTextChanged.connect(onPromptTextChangedDefaultRadiusUserPref); + Window.promptAsync("Entity List Default Radius (in meters)", "" + Settings.getValue(SETTING_ENTITY_LIST_DEFAULT_RADIUS, 100)); } tooltip.show(false); } From 636d52b306ab5e6de49eb5eca6d700ce997a9bdb Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Thu, 12 Nov 2020 23:48:15 -0500 Subject: [PATCH 17/21] =?UTF-8?q?Add=20=E2=80=9CImport=20Entities=20(.json?= =?UTF-8?q?)=20from=20a=20URL=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The action “Import Entities (.json) from a URL” has been added to the “Create” Tab. (It was available only in the Edit menu.) --- scripts/system/create/qml/EditTabView.qml | 25 ++++++++++++++++--- .../system/create/qml/EditToolsTabView.qml | 25 ++++++++++++++++--- 2 files changed, 44 insertions(+), 6 deletions(-) diff --git a/scripts/system/create/qml/EditTabView.qml b/scripts/system/create/qml/EditTabView.qml index 53f6068424..617cdd9e5a 100644 --- a/scripts/system/create/qml/EditTabView.qml +++ b/scripts/system/create/qml/EditTabView.qml @@ -201,11 +201,11 @@ TabBar { HifiControls.Button { id: importButton - text: "Import Entities (.json)" + text: "Import Entities (.json) from a File" color: hifi.buttons.black colorScheme: hifi.colorSchemes.dark - anchors.right: parent.right - anchors.rightMargin: 30 + anchors.right: parent.horizontalCenter + anchors.rightMargin: 10 anchors.left: parent.left anchors.leftMargin: 30 anchors.top: assetServerButton.bottom @@ -217,6 +217,25 @@ TabBar { }); } } + + HifiControls.Button { + id: importButtonFromUrl + text: "Import Entities (.json) from a URL" + color: hifi.buttons.black + colorScheme: hifi.colorSchemes.dark + anchors.right: parent.right + anchors.rightMargin: 30 + anchors.left: parent.horizontalCenter + anchors.leftMargin: 10 + anchors.top: assetServerButton.bottom + anchors.topMargin: 20 + onClicked: { + editRoot.sendToScript({ + method: "newEntityButtonClicked", + params: { buttonName: "importEntitiesFromUrlButton" } + }); + } + } } } // Flickable } diff --git a/scripts/system/create/qml/EditToolsTabView.qml b/scripts/system/create/qml/EditToolsTabView.qml index 0ce8d8e8d4..8379b47259 100644 --- a/scripts/system/create/qml/EditToolsTabView.qml +++ b/scripts/system/create/qml/EditToolsTabView.qml @@ -207,11 +207,11 @@ TabBar { HifiControls.Button { id: importButton - text: "Import Entities (.json)" + text: "Import Entities (.json) from a File" color: hifi.buttons.black colorScheme: hifi.colorSchemes.dark - anchors.right: parent.right - anchors.rightMargin: 55 + anchors.right: parent.horizontalCenter + anchors.rightMargin: 10 anchors.left: parent.left anchors.leftMargin: 55 anchors.top: assetServerButton.bottom @@ -223,6 +223,25 @@ TabBar { }); } } + + HifiControls.Button { + id: importButtonFromUrl + text: "Import Entities (.json) from a URL" + color: hifi.buttons.black + colorScheme: hifi.colorSchemes.dark + anchors.right: parent.right + anchors.rightMargin: 55 + anchors.left: parent.horizontalCenter + anchors.leftMargin: 10 + anchors.top: assetServerButton.bottom + anchors.topMargin: 20 + onClicked: { + editRoot.sendToScript({ + method: "newEntityButtonClicked", + params: { buttonName: "importEntitiesFromUrlButton" } + }); + } + } } } // Flickable } From e0cac2b95cac384b1c91e9e7cbbf1fd664412e96 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Thu, 12 Nov 2020 23:52:24 -0500 Subject: [PATCH 18/21] Clean up of the Edit Menu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Create App. Menu Items under the “Edit” menu have been cleaned up. All the actions being transferred has been removed. (some was not even decently usable from there) A new sub-menu “Create Application – Preferences” has been implemented to regroup the remaining menu items that are all User Preferences. Eventually in the future, these might be moved to the Create App. UI. For now, it will be OK, it's already cleaner. --- scripts/system/create/edit.js | 160 ++++++++-------------------------- 1 file changed, 35 insertions(+), 125 deletions(-) diff --git a/scripts/system/create/edit.js b/scripts/system/create/edit.js index a457b62fe6..099cb94988 100644 --- a/scripts/system/create/edit.js +++ b/scripts/system/create/edit.js @@ -146,11 +146,11 @@ var DEFAULT_DIMENSIONS = { var DEFAULT_LIGHT_DIMENSIONS = Vec3.multiply(20, DEFAULT_DIMENSIONS); +var SUBMENU_ENTITY_EDITOR_PREFERENCES = "Edit > Create Application - Preferences"; var MENU_AUTO_FOCUS_ON_SELECT = "Auto Focus on Select"; var MENU_EASE_ON_FOCUS = "Ease Orientation on Focus"; var MENU_SHOW_LIGHTS_AND_PARTICLES_IN_EDIT_MODE = "Show Lights and Particle Systems in Create Mode"; var MENU_SHOW_ZONES_IN_EDIT_MODE = "Show Zones in Create Mode"; - var MENU_CREATE_ENTITIES_GRABBABLE = "Create Entities As Grabbable (except Zones, Particles, and Lights)"; var MENU_ALLOW_SELECTION_LARGE = "Allow Selecting of Large Models"; var MENU_ALLOW_SELECTION_SMALL = "Allow Selecting of Small Models"; @@ -270,8 +270,6 @@ function adjustPositionPerBoundingBox(position, direction, registration, dimensi return position; } -var GRABBABLE_ENTITIES_MENU_CATEGORY = "Edit"; - // Handles any edit mode updates required when domains have switched function checkEditPermissionsAndUpdate() { if ((createButton === null) || (createButton === undefined)) { @@ -881,7 +879,12 @@ var toolBar = (function () { addButton("importEntitiesButton", function() { Window.browseChanged.connect(onFileOpenChanged); - Window.browseAsync("Select Model to Import", "", "*.json"); + Window.browseAsync("Select .json to Import", "", "*.json"); + }); + + addButton("importEntitiesFromUrlButton", function() { + Window.promptTextChanged.connect(onPromptTextChanged); + Window.promptAsync("URL of a .json to import", ""); }); addButton("openAssetBrowserButton", function() { @@ -1381,11 +1384,9 @@ Controller.mouseReleaseEvent.connect(mouseReleaseEvent); // In order for editVoxels and editModels to play nice together, they each check to see if a "delete" menu item already // exists. If it doesn't they add it. If it does they don't. They also only delete the menu item if they were the one that // added it. -var modelMenuAddedDelete = false; var originalLightsArePickable = Entities.getLightsArePickable(); function setupModelMenus() { - // adj our menuitems Menu.addMenuItem({ menuName: "Edit", menuItemName: "Undo", @@ -1399,120 +1400,66 @@ function setupModelMenus() { position: 1, }); - Menu.addMenuItem({ - menuName: "Edit", - menuItemName: "Entities", - isSeparator: true - }); - if (!Menu.menuItemExists("Edit", "Delete")) { - Menu.addMenuItem({ - menuName: "Edit", - menuItemName: "Delete", - shortcutKeyEvent: { - text: "delete" - }, - afterItem: "Entities", - }); - modelMenuAddedDelete = true; - } + Menu.addMenu(SUBMENU_ENTITY_EDITOR_PREFERENCES); Menu.addMenuItem({ - menuName: "Edit", - menuItemName: "Parent Entity to Last", - afterItem: "Entities" - }); - - Menu.addMenuItem({ - menuName: "Edit", - menuItemName: "Unparent Entity", - afterItem: "Parent Entity to Last" - }); - - Menu.addMenuItem({ - menuName: GRABBABLE_ENTITIES_MENU_CATEGORY, + menuName: SUBMENU_ENTITY_EDITOR_PREFERENCES, menuItemName: MENU_CREATE_ENTITIES_GRABBABLE, - afterItem: "Unparent Entity", + position: 0, isCheckable: true, isChecked: Settings.getValue(SETTING_EDIT_PREFIX + MENU_CREATE_ENTITIES_GRABBABLE, false) }); - Menu.addMenuItem({ - menuName: "Edit", + menuName: SUBMENU_ENTITY_EDITOR_PREFERENCES, menuItemName: MENU_ALLOW_SELECTION_LARGE, afterItem: MENU_CREATE_ENTITIES_GRABBABLE, isCheckable: true, isChecked: Settings.getValue(SETTING_EDIT_PREFIX + MENU_ALLOW_SELECTION_LARGE, true) }); Menu.addMenuItem({ - menuName: "Edit", + menuName: SUBMENU_ENTITY_EDITOR_PREFERENCES, menuItemName: MENU_ALLOW_SELECTION_SMALL, afterItem: MENU_ALLOW_SELECTION_LARGE, isCheckable: true, isChecked: Settings.getValue(SETTING_EDIT_PREFIX + MENU_ALLOW_SELECTION_SMALL, true) }); Menu.addMenuItem({ - menuName: "Edit", + menuName: SUBMENU_ENTITY_EDITOR_PREFERENCES, menuItemName: MENU_ALLOW_SELECTION_LIGHTS, afterItem: MENU_ALLOW_SELECTION_SMALL, isCheckable: true, isChecked: Settings.getValue(SETTING_EDIT_PREFIX + MENU_ALLOW_SELECTION_LIGHTS, false) }); Menu.addMenuItem({ - menuName: "Edit", - menuItemName: "Select All Entities In Box", - afterItem: "Allow Selecting of Lights" - }); - Menu.addMenuItem({ - menuName: "Edit", - menuItemName: "Select All Entities Touching Box", - afterItem: "Select All Entities In Box" - }); - - Menu.addMenuItem({ - menuName: "Edit", - menuItemName: "Export Entities", - afterItem: "Entities" - }); - Menu.addMenuItem({ - menuName: "Edit", - menuItemName: "Import Entities", - afterItem: "Export Entities" - }); - Menu.addMenuItem({ - menuName: "Edit", - menuItemName: "Import Entities from URL", - afterItem: "Import Entities" - }); - - Menu.addMenuItem({ - menuName: "Edit", + menuName: SUBMENU_ENTITY_EDITOR_PREFERENCES, menuItemName: MENU_AUTO_FOCUS_ON_SELECT, + afterItem: MENU_ALLOW_SELECTION_LIGHTS, isCheckable: true, isChecked: Settings.getValue(SETTING_AUTO_FOCUS_ON_SELECT) === "true" }); Menu.addMenuItem({ - menuName: "Edit", + menuName: SUBMENU_ENTITY_EDITOR_PREFERENCES, menuItemName: MENU_EASE_ON_FOCUS, afterItem: MENU_AUTO_FOCUS_ON_SELECT, isCheckable: true, isChecked: Settings.getValue(SETTING_EASE_ON_FOCUS) === "true" }); Menu.addMenuItem({ - menuName: "Edit", + menuName: SUBMENU_ENTITY_EDITOR_PREFERENCES, menuItemName: MENU_SHOW_LIGHTS_AND_PARTICLES_IN_EDIT_MODE, afterItem: MENU_EASE_ON_FOCUS, isCheckable: true, isChecked: Settings.getValue(SETTING_SHOW_LIGHTS_AND_PARTICLES_IN_EDIT_MODE) !== "false" }); Menu.addMenuItem({ - menuName: "Edit", + menuName: SUBMENU_ENTITY_EDITOR_PREFERENCES, menuItemName: MENU_SHOW_ZONES_IN_EDIT_MODE, afterItem: MENU_SHOW_LIGHTS_AND_PARTICLES_IN_EDIT_MODE, isCheckable: true, isChecked: Settings.getValue(SETTING_SHOW_ZONES_IN_EDIT_MODE) !== "false" }); Menu.addMenuItem({ - menuName: "Edit", + menuName: SUBMENU_ENTITY_EDITOR_PREFERENCES, menuItemName: MENU_ENTITY_LIST_DEFAULT_RADIUS, afterItem: MENU_SHOW_ZONES_IN_EDIT_MODE }); @@ -1526,30 +1473,16 @@ function cleanupModelMenus() { Menu.removeMenuItem("Edit", "Undo"); Menu.removeMenuItem("Edit", "Redo"); - Menu.removeSeparator("Edit", "Entities"); - if (modelMenuAddedDelete) { - // delete our menuitems - Menu.removeMenuItem("Edit", "Delete"); - } - - Menu.removeMenuItem("Edit", "Parent Entity to Last"); - Menu.removeMenuItem("Edit", "Unparent Entity"); - Menu.removeMenuItem("Edit", "Allow Selecting of Large Models"); - Menu.removeMenuItem("Edit", "Allow Selecting of Small Models"); - Menu.removeMenuItem("Edit", "Allow Selecting of Lights"); - Menu.removeMenuItem("Edit", "Select All Entities In Box"); - Menu.removeMenuItem("Edit", "Select All Entities Touching Box"); - - Menu.removeMenuItem("Edit", "Export Entities"); - Menu.removeMenuItem("Edit", "Import Entities"); - Menu.removeMenuItem("Edit", "Import Entities from URL"); - - Menu.removeMenuItem("Edit", MENU_AUTO_FOCUS_ON_SELECT); - Menu.removeMenuItem("Edit", MENU_EASE_ON_FOCUS); - Menu.removeMenuItem("Edit", MENU_SHOW_LIGHTS_AND_PARTICLES_IN_EDIT_MODE); - Menu.removeMenuItem("Edit", MENU_SHOW_ZONES_IN_EDIT_MODE); - Menu.removeMenuItem("Edit", MENU_CREATE_ENTITIES_GRABBABLE); - Menu.removeMenuItem("Edit", MENU_ENTITY_LIST_DEFAULT_RADIUS); + Menu.removeMenuItem(SUBMENU_ENTITY_EDITOR_PREFERENCES, MENU_ALLOW_SELECTION_LARGE); + Menu.removeMenuItem(SUBMENU_ENTITY_EDITOR_PREFERENCES, MENU_ALLOW_SELECTION_SMALL); + Menu.removeMenuItem(SUBMENU_ENTITY_EDITOR_PREFERENCES, MENU_ALLOW_SELECTION_LIGHTS); + Menu.removeMenuItem(SUBMENU_ENTITY_EDITOR_PREFERENCES, MENU_AUTO_FOCUS_ON_SELECT); + Menu.removeMenuItem(SUBMENU_ENTITY_EDITOR_PREFERENCES, MENU_EASE_ON_FOCUS); + Menu.removeMenuItem(SUBMENU_ENTITY_EDITOR_PREFERENCES, MENU_SHOW_LIGHTS_AND_PARTICLES_IN_EDIT_MODE); + Menu.removeMenuItem(SUBMENU_ENTITY_EDITOR_PREFERENCES, MENU_SHOW_ZONES_IN_EDIT_MODE); + Menu.removeMenuItem(SUBMENU_ENTITY_EDITOR_PREFERENCES, MENU_CREATE_ENTITIES_GRABBABLE); + Menu.removeMenuItem(SUBMENU_ENTITY_EDITOR_PREFERENCES, MENU_ENTITY_LIST_DEFAULT_RADIUS); + Menu.removeMenu(SUBMENU_ENTITY_EDITOR_PREFERENCES); } Script.scriptEnding.connect(function () { @@ -1902,41 +1835,18 @@ function onPromptTextChangedDefaultRadiusUserPref(prompt) { } function handleMenuEvent(menuItem) { - if (menuItem === "Allow Selecting of Small Models") { - allowSmallModels = Menu.isOptionChecked("Allow Selecting of Small Models"); - } else if (menuItem === "Allow Selecting of Large Models") { - allowLargeModels = Menu.isOptionChecked("Allow Selecting of Large Models"); - } else if (menuItem === "Allow Selecting of Lights") { - Entities.setLightsArePickable(Menu.isOptionChecked("Allow Selecting of Lights")); + if (menuItem === MENU_ALLOW_SELECTION_SMALL) { + allowSmallModels = Menu.isOptionChecked(MENU_ALLOW_SELECTION_SMALL); + } else if (menuItem === MENU_ALLOW_SELECTION_LARGE) { + allowLargeModels = Menu.isOptionChecked(MENU_ALLOW_SELECTION_LARGE); + } else if (menuItem === MENU_ALLOW_SELECTION_LIGHTS) { + Entities.setLightsArePickable(Menu.isOptionChecked(MENU_ALLOW_SELECTION_LIGHTS)); } else if (menuItem === "Delete") { deleteSelectedEntities(); } else if (menuItem === "Undo") { undoHistory.undo(); } else if (menuItem === "Redo") { undoHistory.redo(); - } else if (menuItem === "Parent Entity to Last") { - parentSelectedEntities(); - } else if (menuItem === "Unparent Entity") { - unparentSelectedEntities(); - } else if (menuItem === "Export Entities") { - if (!selectionManager.hasSelection()) { - Window.notifyEditError("No entities have been selected."); - } else { - Window.saveFileChanged.connect(onFileSaveChanged); - Window.saveAsync("Select Where to Save", "", "*.json"); - } - } else if (menuItem === "Import Entities" || menuItem === "Import Entities from URL") { - if (menuItem === "Import Entities") { - Window.browseChanged.connect(onFileOpenChanged); - Window.browseAsync("Select Model to Import", "", "*.json"); - } else { - Window.promptTextChanged.connect(onPromptTextChanged); - Window.promptAsync("URL of a .json to import", ""); - } - } else if (menuItem === "Select All Entities In Box") { - selectAllEntitiesInCurrentSelectionBox(false); - } else if (menuItem === "Select All Entities Touching Box") { - selectAllEntitiesInCurrentSelectionBox(true); } else if (menuItem === MENU_SHOW_LIGHTS_AND_PARTICLES_IN_EDIT_MODE) { entityIconOverlayManager.setVisible(isActive && Menu.isOptionChecked(MENU_SHOW_LIGHTS_AND_PARTICLES_IN_EDIT_MODE)); } else if (menuItem === MENU_SHOW_ZONES_IN_EDIT_MODE) { From 33eb01a6c7bedb1da6b3041125dcdebe93db4d3a Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Sat, 14 Nov 2020 22:33:38 -0500 Subject: [PATCH 19/21] Minor code adjustments Minor code adjustments --- scripts/system/create/entityList/html/entityList.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/system/create/entityList/html/entityList.html b/scripts/system/create/entityList/html/entityList.html index 63e774c787..a5f27bd3a8 100644 --- a/scripts/system/create/entityList/html/entityList.html +++ b/scripts/system/create/entityList/html/entityList.html @@ -225,7 +225,7 @@ - + From 2475deac930db55752f5ac7188dbe6be29c0b9e5 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Sat, 14 Nov 2020 22:36:28 -0500 Subject: [PATCH 20/21] Minor code adjustments Minor code adjustments --- scripts/system/create/entityList/html/js/entityList.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/system/create/entityList/html/js/entityList.js b/scripts/system/create/entityList/html/js/entityList.js index c8e09e2b37..89eac5fb2f 100644 --- a/scripts/system/create/entityList/html/js/entityList.js +++ b/scripts/system/create/entityList/html/js/entityList.js @@ -1714,9 +1714,9 @@ function loaded() { let currentColumnIndex = originalColumnIDs.indexOf(data.columnsData[columnIndex].columnID); if (currentColumnIndex !== -1 && columnIndex !== currentColumnIndex) { for (var i = currentColumnIndex; i > columnIndex; i--) { - swapColumns(i-1, i); - var swappedContent = originalColumnIDs[i-1]; - originalColumnIDs[i-1] = originalColumnIDs[i]; + swapColumns(i - 1, i); + var swappedContent = originalColumnIDs[i - 1]; + originalColumnIDs[i - 1] = originalColumnIDs[i]; originalColumnIDs[i] = swappedContent; } } From da2737de530d5a91550116d38ea3215f01cd8d15 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Sat, 14 Nov 2020 22:39:47 -0500 Subject: [PATCH 21/21] Minor Code Adjustements Minor Code Adjustements --- scripts/system/create/qml/EditToolsTabView.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/system/create/qml/EditToolsTabView.qml b/scripts/system/create/qml/EditToolsTabView.qml index 8379b47259..2403604342 100644 --- a/scripts/system/create/qml/EditToolsTabView.qml +++ b/scripts/system/create/qml/EditToolsTabView.qml @@ -211,7 +211,7 @@ TabBar { color: hifi.buttons.black colorScheme: hifi.colorSchemes.dark anchors.right: parent.horizontalCenter - anchors.rightMargin: 10 + anchors.rightMargin: 10 anchors.left: parent.left anchors.leftMargin: 55 anchors.top: assetServerButton.bottom @@ -241,7 +241,7 @@ TabBar { params: { buttonName: "importEntitiesFromUrlButton" } }); } - } + } } } // Flickable }