mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 05:52:31 +02:00
fix for continuous color picker update spam / only update color picker from properties when entity selection has changed
This commit is contained in:
parent
6cd5770505
commit
6cabc86130
1 changed files with 3 additions and 2 deletions
|
@ -3317,7 +3317,8 @@ function loaded() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let doSelectElement = lastEntityID === '"' + selectedEntityProperties.id + '"';
|
let hasSelectedEntityChanged = lastEntityID !== '"' + selectedEntityProperties.id + '"';
|
||||||
|
let doSelectElement = !hasSelectedEntityChanged;
|
||||||
|
|
||||||
// the event bridge and json parsing handle our avatar id string differently.
|
// the event bridge and json parsing handle our avatar id string differently.
|
||||||
lastEntityID = '"' + selectedEntityProperties.id + '"';
|
lastEntityID = '"' + selectedEntityProperties.id + '"';
|
||||||
|
@ -3437,7 +3438,7 @@ function loaded() {
|
||||||
property.elColorPicker.style.backgroundColor = "rgb(" + propertyValue.red + "," +
|
property.elColorPicker.style.backgroundColor = "rgb(" + propertyValue.red + "," +
|
||||||
propertyValue.green + "," +
|
propertyValue.green + "," +
|
||||||
propertyValue.blue + ")";
|
propertyValue.blue + ")";
|
||||||
if ($(property.elColorPicker).attr('active') === 'true') {
|
if (hasSelectedEntityChanged && $(property.elColorPicker).attr('active') === 'true') {
|
||||||
// Set the color picker inactive before setting the color,
|
// Set the color picker inactive before setting the color,
|
||||||
// otherwise an update will be sent directly after setting it here.
|
// otherwise an update will be sent directly after setting it here.
|
||||||
$(property.elColorPicker).attr('active', 'false');
|
$(property.elColorPicker).attr('active', 'false');
|
||||||
|
|
Loading…
Reference in a new issue