fix colors

This commit is contained in:
David Back 2018-10-10 17:31:06 -07:00
parent 31e665ab8b
commit ac0e999629

View file

@ -928,7 +928,9 @@ function getPropertyElement(propertyName) {
}
function getPropertyElementID(propertyName) {
return "property-" + propertyName;
let propertyElementID = "property-" + propertyName;
propertyElementID = propertyElementID.replace(".", "-");
return propertyElementID;
}
function enableChildren(el, selector) {
@ -1077,7 +1079,6 @@ function showGroupsForType(type) {
}
// PROPERTY UPDATE FUNCTIONS
function updateProperty(propertyName, propertyValue) {
@ -1207,7 +1208,6 @@ function createImageURLUpdateFunction(propertyName) {
}
// PROPERTY ELEMENT CREATION FUNCTIONS
function createStringProperty(elProperty, elLabel, propertyData) {
@ -1381,7 +1381,7 @@ function createColorProperty(elProperty, elLabel, propertyData) {
},
onChange: function(hsb, hex, rgb, el) {
$(el).css('background-color', '#' + hex);
emitColorPropertyUpdate('color', rgb.r, rgb.g, rgb.b);
emitColorPropertyUpdate(propertyName, rgb.r, rgb.g, rgb.b);
}
});
@ -1573,7 +1573,6 @@ function addButtons(elProperty, propertyID, buttons, newRow) {
}
// BUTTON CALLBACKS
function rescaleDimensions() {
@ -1628,7 +1627,6 @@ function copySkyboxURLToAmbientURL() {
}
// USER DATA FUNCTIONS
function clearUserData() {
@ -1850,7 +1848,6 @@ function saveJSONUserData(noUpdate) {
}
// MATERIAL DATA FUNCTIONS
function clearMaterialData() {
@ -2035,7 +2032,6 @@ function bindAllNonJSONEditorElements() {
}
// DROPDOWNS / TEXTAREAS / PARENT MATERIAL NAME FUNCTIONS
function setDropdownText(dropdown) {
@ -2122,7 +2118,6 @@ function loaded() {
let propertyType = property.type;
let propertyName = property.propertyName;
let propertyElementID = getPropertyElementID(propertyName);
propertyElementID = propertyElementID.replace(".", "-");
let elProperty;
if (propertyType === "sub-header") {