This commit is contained in:
Thijs Wenker 2018-12-06 23:42:12 +01:00
parent 2771e2862e
commit 4f2289b347

View file

@ -1429,13 +1429,13 @@ const TEXTURE_ELEMENTS = {
const JSON_EDITOR_ROW_DIV_INDEX = 2; const JSON_EDITOR_ROW_DIV_INDEX = 2;
var elGroups = {}; let elGroups = {};
var properties = {}; let properties = {};
var colorPickers = {}; let colorPickers = {};
var particlePropertyUpdates = {}; let particlePropertyUpdates = {};
var selectedEntityProperties; let selectedEntityProperties;
var lastEntityID = null; let lastEntityID = null;
var createAppTooltip = new CreateAppTooltip(); let createAppTooltip = new CreateAppTooltip();
let currentSpaceMode = PROPERTY_SPACE_MODE.LOCAL; let currentSpaceMode = PROPERTY_SPACE_MODE.LOCAL;
function createElementFromHTML(htmlString) { function createElementFromHTML(htmlString) {
@ -1689,7 +1689,7 @@ function updateProperty(originalPropertyName, propertyValue, isParticleProperty)
} }
} }
var particleSyncDebounce = _.debounce(function () { let particleSyncDebounce = _.debounce(function () {
updateProperties(particlePropertyUpdates); updateProperties(particlePropertyUpdates);
particlePropertyUpdates = {}; particlePropertyUpdates = {};
}, DEBOUNCE_TIMEOUT); }, DEBOUNCE_TIMEOUT);
@ -2361,7 +2361,7 @@ function saveUserData() {
function setJSONError(property, isError) { function setJSONError(property, isError) {
$("#property-"+ property + "-editor").toggleClass('error', isError); $("#property-"+ property + "-editor").toggleClass('error', isError);
var $propertyUserDataEditorStatus = $("#property-"+ property + "-editorStatus"); let $propertyUserDataEditorStatus = $("#property-"+ property + "-editorStatus");
$propertyUserDataEditorStatus.css('display', isError ? 'block' : 'none'); $propertyUserDataEditorStatus.css('display', isError ? 'block' : 'none');
$propertyUserDataEditorStatus.text(isError ? 'Invalid JSON code - look for red X in your code' : ''); $propertyUserDataEditorStatus.text(isError ? 'Invalid JSON code - look for red X in your code' : '');
} }
@ -2377,7 +2377,7 @@ function setUserDataFromEditor(noUpdate) {
setJSONError('userData', errorFound); setJSONError('userData', errorFound);
if (json !== null) { if (errorFound) {
return; return;
} }
@ -2452,7 +2452,7 @@ function multiDataUpdater(groupName, updateKeyPair, userDataElement, defaults, r
updateProperties(propertyUpdate, false); updateProperties(propertyUpdate, false);
} }
var editor = null; let editor = null;
function createJSONEditor() { function createJSONEditor() {
let container = document.getElementById("property-userData-editor"); let container = document.getElementById("property-userData-editor");
@ -2545,7 +2545,7 @@ function deleteJSONEditor() {
} }
} }
var savedJSONTimer = null; let savedJSONTimer = null;
function saveJSONUserData(noUpdate) { function saveJSONUserData(noUpdate) {
setUserDataFromEditor(noUpdate); setUserDataFromEditor(noUpdate);
@ -2599,7 +2599,7 @@ function setMaterialDataFromEditor(noUpdate) {
setJSONError('materialData', errorFound); setJSONError('materialData', errorFound);
if (json === null) { if (errorFound) {
return; return;
} }
let text = materialEditor.getText(); let text = materialEditor.getText();
@ -2618,7 +2618,7 @@ function setMaterialDataFromEditor(noUpdate) {
} }
} }
var materialEditor = null; let materialEditor = null;
function createJSONMaterialEditor() { function createJSONMaterialEditor() {
let container = document.getElementById("property-materialData-editor"); let container = document.getElementById("property-materialData-editor");
@ -2711,7 +2711,7 @@ function deleteJSONMaterialEditor() {
} }
} }
var savedMaterialJSONTimer = null; let savedMaterialJSONTimer = null;
function saveJSONMaterialData(noUpdate) { function saveJSONMaterialData(noUpdate) {
setMaterialDataFromEditor(noUpdate); setMaterialDataFromEditor(noUpdate);