mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 12:29:56 +02:00
Add Hierarchy display in List and Selection
Add Hierarchy display in List and Selection
This commit is contained in:
parent
46bb29bded
commit
8baebbdd16
1 changed files with 19 additions and 2 deletions
|
@ -134,6 +134,14 @@ const COLUMNS = {
|
||||||
initialWidth: 0.06,
|
initialWidth: 0.06,
|
||||||
defaultSortOrder: DESCENDING_SORT,
|
defaultSortOrder: DESCENDING_SORT,
|
||||||
},
|
},
|
||||||
|
parentState: {
|
||||||
|
columnHeader: "M",
|
||||||
|
vglyph: true,
|
||||||
|
dropdownLabel: "Hierarchy",
|
||||||
|
propertyID: "parentState",
|
||||||
|
initialWidth: 0.04,
|
||||||
|
defaultSortOrder: DESCENDING_SORT,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const FILTER_TYPES = [
|
const FILTER_TYPES = [
|
||||||
|
@ -499,9 +507,12 @@ function loaded() {
|
||||||
elTh.setAttribute("id", thID);
|
elTh.setAttribute("id", thID);
|
||||||
elTh.setAttribute("columnIndex", columnIndex);
|
elTh.setAttribute("columnIndex", columnIndex);
|
||||||
elTh.setAttribute("columnID", columnID);
|
elTh.setAttribute("columnID", columnID);
|
||||||
if (columnData.glyph) {
|
if (columnData.glyph || columnData.vglyph) {
|
||||||
let elGlyph = document.createElement("span");
|
let elGlyph = document.createElement("span");
|
||||||
elGlyph.className = "glyph";
|
elGlyph.className = "glyph";
|
||||||
|
if (columnData.vglyph) {
|
||||||
|
elGlyph.className = "vglyph";
|
||||||
|
}
|
||||||
elGlyph.innerHTML = columnData.columnHeader;
|
elGlyph.innerHTML = columnData.columnHeader;
|
||||||
elTh.appendChild(elGlyph);
|
elTh.appendChild(elGlyph);
|
||||||
} else {
|
} else {
|
||||||
|
@ -801,10 +812,11 @@ function loaded() {
|
||||||
isBaked: entity.isBaked,
|
isBaked: entity.isBaked,
|
||||||
drawCalls: displayIfNonZero(entity.drawCalls),
|
drawCalls: displayIfNonZero(entity.drawCalls),
|
||||||
hasScript: entity.hasScript,
|
hasScript: entity.hasScript,
|
||||||
|
parentState: entity.parentState,
|
||||||
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
|
||||||
};
|
};
|
||||||
|
|
||||||
entities.push(entityData);
|
entities.push(entityData);
|
||||||
entitiesByID[entityData.id] = entityData;
|
entitiesByID[entityData.id] = entityData;
|
||||||
});
|
});
|
||||||
|
@ -1060,6 +1072,8 @@ function loaded() {
|
||||||
let elCell = elRow.childNodes[i];
|
let elCell = elRow.childNodes[i];
|
||||||
if (column.data.glyph) {
|
if (column.data.glyph) {
|
||||||
elCell.innerHTML = itemData[column.data.propertyID] ? column.data.columnHeader : null;
|
elCell.innerHTML = itemData[column.data.propertyID] ? column.data.columnHeader : null;
|
||||||
|
} else if (column.data.vglyph) {
|
||||||
|
elCell.innerHTML = itemData[column.data.propertyID];
|
||||||
} else {
|
} else {
|
||||||
let value = itemData[column.data.propertyID];
|
let value = itemData[column.data.propertyID];
|
||||||
if (column.data.format) {
|
if (column.data.format) {
|
||||||
|
@ -1147,6 +1161,9 @@ function loaded() {
|
||||||
let column = columnsByID[columnID];
|
let column = columnsByID[columnID];
|
||||||
let visible = column.elTh.style.visibility !== "hidden";
|
let visible = column.elTh.style.visibility !== "hidden";
|
||||||
let className = column.data.glyph ? "glyph" : "";
|
let className = column.data.glyph ? "glyph" : "";
|
||||||
|
if (column.data.vglyph) {
|
||||||
|
className = "vglyph";
|
||||||
|
}
|
||||||
className += visible ? "" : " hidden";
|
className += visible ? "" : " hidden";
|
||||||
return className;
|
return className;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue