mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 16:18:05 +02:00
Added event for dropdown property (work in progress 3)
This commit is contained in:
parent
679cd3ff38
commit
e30881bcf9
1 changed files with 15 additions and 2 deletions
|
@ -2344,6 +2344,7 @@ function updateMultiDiffProperties(propertiesMapToUpdate, onlyUpdateEntity) {
|
||||||
|
|
||||||
function createEmitTextPropertyUpdateFunction(property) {
|
function createEmitTextPropertyUpdateFunction(property) {
|
||||||
return function() {
|
return function() {
|
||||||
|
alert('event orig');
|
||||||
property.elInput.classList.remove('multi-diff');
|
property.elInput.classList.remove('multi-diff');
|
||||||
updateProperty(property.name, this.value, property.isParticleProperty);
|
updateProperty(property.name, this.value, property.isParticleProperty);
|
||||||
};
|
};
|
||||||
|
@ -2931,9 +2932,11 @@ function createDropdownProperty(property, propertyID, elProperty) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//elInput.addEventListener('change', createEmitTextPropertyUpdateFunction(property));
|
//elInput.addEventListener('change', createEmitTextPropertyUpdateFunction(property));
|
||||||
|
elInput.addEventListener('change', createPolyVoxPresetChangedFunction(property));
|
||||||
if (propertyData.
|
if (propertyData.
|
||||||
onDropdownChange !== undefined) {
|
onDropdownChange !== undefined) {
|
||||||
elInput.addEventListener('change', propertyData.onDropdownChange);
|
alert("registered");
|
||||||
|
//elInput.addEventListener('change', propertyData.onDropdownChange);
|
||||||
}
|
}
|
||||||
|
|
||||||
elProperty.appendChild(elInput);
|
elProperty.appendChild(elInput);
|
||||||
|
@ -3252,13 +3255,23 @@ function parentIDChanged() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function createPolyVoxPresetChangedFunction(property) {
|
||||||
|
return function() {
|
||||||
|
alert('event');
|
||||||
|
property.elInput.classList.remove('multi-diff');
|
||||||
|
updateProperty(property.name, this.value, property.isParticleProperty);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*function polyVoxPresetChanged(property) {
|
/*function polyVoxPresetChanged(property) {
|
||||||
return function() {
|
return function() {
|
||||||
|
property.elInput.classList.remove('multi-diff');
|
||||||
alert('PolyVox preset 2 ' + JSON.stringify(property));
|
alert('PolyVox preset 2 ' + JSON.stringify(property));
|
||||||
updateProperty("xTextureURL", "test", false);
|
updateProperty("xTextureURL", "test", false);
|
||||||
updateProperty("yTextureURL", "test", false);
|
updateProperty("yTextureURL", "test", false);
|
||||||
updateProperty("zTextureURL", "test", false);
|
updateProperty("zTextureURL", "test", false);
|
||||||
}
|
};
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
function polyVoxPresetChanged() {
|
function polyVoxPresetChanged() {
|
||||||
|
|
Loading…
Reference in a new issue