mirror of
https://github.com/overte-org/overte.git
synced 2025-07-22 22:34:12 +02:00
Adding Avatar Entity Highlighting
Adding Avatar Entity Highlighting
This commit is contained in:
parent
151546619d
commit
652bb6f6da
1 changed files with 31 additions and 6 deletions
|
@ -987,6 +987,7 @@ function loaded() {
|
||||||
parentState: entity.parentState,
|
parentState: entity.parentState,
|
||||||
created: entity.created,
|
created: entity.created,
|
||||||
lastEdited: entity.lastEdited,
|
lastEdited: entity.lastEdited,
|
||||||
|
entityHostType: entity.entityHostType,
|
||||||
elRow: null, // if this entity has a visible row element assigned to it
|
elRow: null, // if this entity has a visible row element assigned to it
|
||||||
selected: false // if this entity is selected for edit regardless of having a visible row
|
selected: false // if this entity is selected for edit regardless of having a visible row
|
||||||
};
|
};
|
||||||
|
@ -1183,7 +1184,11 @@ function loaded() {
|
||||||
if (entity !== undefined) {
|
if (entity !== undefined) {
|
||||||
entity.selected = false;
|
entity.selected = false;
|
||||||
if (entity.elRow) {
|
if (entity.elRow) {
|
||||||
entity.elRow.className = "";
|
if (entity.entityHostType === "avatar") {
|
||||||
|
entity.elRow.className = "avatarEntity";
|
||||||
|
} else {
|
||||||
|
entity.elRow.className = "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1197,9 +1202,17 @@ function loaded() {
|
||||||
entity.selected = true;
|
entity.selected = true;
|
||||||
if (entity.elRow) {
|
if (entity.elRow) {
|
||||||
if (id === lastSelectedEntity) {
|
if (id === lastSelectedEntity) {
|
||||||
entity.elRow.className = "last-selected";
|
if (entity.entityHostType === "avatar") {
|
||||||
|
entity.elRow.className = "lastSelAvatarEntity";
|
||||||
|
} else {
|
||||||
|
entity.elRow.className = "last-selected";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
entity.elRow.className = "selected";
|
if (entity.entityHostType === "avatar") {
|
||||||
|
entity.elRow.className = "selAvatarEntity";
|
||||||
|
} else {
|
||||||
|
entity.elRow.className = "selected";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -1270,12 +1283,24 @@ function loaded() {
|
||||||
// if this entity was previously selected flag it's row as selected
|
// if this entity was previously selected flag it's row as selected
|
||||||
if (itemData.selected) {
|
if (itemData.selected) {
|
||||||
if (itemData.id === lastSelectedEntity) {
|
if (itemData.id === lastSelectedEntity) {
|
||||||
elRow.className = "last-selected";
|
if (itemData.entityHostType === "avatar") {
|
||||||
|
elRow.className = "lastSelAvatarEntity";
|
||||||
|
} else {
|
||||||
|
elRow.className = "last-selected";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
elRow.className = "selected";
|
if (itemData.entityHostType === "avatar") {
|
||||||
|
elRow.className = "selAvatarEntity";
|
||||||
|
} else {
|
||||||
|
elRow.className = "selected";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
elRow.className = "";
|
if (itemData.entityHostType === "avatar") {
|
||||||
|
elRow.className = "avatarEntity";
|
||||||
|
} else {
|
||||||
|
elRow.className = "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if this row previously had an associated entity ID that wasn't the new entity ID then clear
|
// if this row previously had an associated entity ID that wasn't the new entity ID then clear
|
||||||
|
|
Loading…
Reference in a new issue