mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
Merge pull request #14043 from huffman/fix/entity-list-sort-visible-lock-74
Fix sorting of entity list not working as expected
This commit is contained in:
commit
fa5bb84628
1 changed files with 22 additions and 19 deletions
|
@ -27,8 +27,11 @@ const COMPARE_ASCENDING = function(a, b) {
|
|||
return -1;
|
||||
} else if (va > vb) {
|
||||
return 1;
|
||||
} else if (a.id < b.id) {
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
const COMPARE_DESCENDING = function(a, b) {
|
||||
return COMPARE_ASCENDING(b, a);
|
||||
|
@ -223,15 +226,15 @@ function loaded() {
|
|||
type: type,
|
||||
url: filename,
|
||||
fullUrl: entity.url,
|
||||
locked: entity.locked ? LOCKED_GLYPH : null,
|
||||
visible: entity.visible ? VISIBLE_GLYPH : null,
|
||||
verticesCount: displayIfNonZero(entity.verticesCount),
|
||||
texturesCount: displayIfNonZero(entity.texturesCount),
|
||||
texturesSize: decimalMegabytes(entity.texturesSize),
|
||||
hasTransparent: entity.hasTransparent ? TRANSPARENCY_GLYPH : null,
|
||||
isBaked: entity.isBaked ? BAKED_GLYPH : null,
|
||||
drawCalls: displayIfNonZero(entity.drawCalls),
|
||||
hasScript: entity.hasScript ? SCRIPT_GLYPH : null,
|
||||
locked: entity.locked,
|
||||
visible: entity.visible,
|
||||
verticesCount: entity.verticesCount,
|
||||
texturesCount: entity.texturesCount,
|
||||
texturesSize: entity.texturesSize,
|
||||
hasTransparent: entity.hasTransparent,
|
||||
isBaked: entity.isBaked,
|
||||
drawCalls: entity.drawCalls,
|
||||
hasScript: entity.hasScript,
|
||||
}
|
||||
|
||||
entities.push(entityData);
|
||||
|
@ -259,15 +262,15 @@ function loaded() {
|
|||
addColumn('type', entity.type);
|
||||
addColumn('name', entity.name);
|
||||
addColumn('url', entity.url);
|
||||
addColumnHTML('locked glyph', entity.locked);
|
||||
addColumnHTML('visible glyph', entity.visible);
|
||||
addColumn('verticesCount', entity.verticesCount);
|
||||
addColumn('texturesCount', entity.texturesCount);
|
||||
addColumn('texturesSize', entity.texturesSize);
|
||||
addColumnHTML('hasTransparent glyph', entity.hasTransparent);
|
||||
addColumnHTML('isBaked glyph', entity.isBaked);
|
||||
addColumn('drawCalls', entity.drawCalls);
|
||||
addColumn('hasScript glyph', entity.hasScript);
|
||||
addColumnHTML('locked glyph', entity.locked ? LOCKED_GLYPH : null);
|
||||
addColumnHTML('visible glyph', entity.visible ? VISIBLE_GLYPH : null);
|
||||
addColumn('verticesCount', displayIfNonZero(entity.verticesCount));
|
||||
addColumn('texturesCount', displayIfNonZero(entity.texturesCount));
|
||||
addColumn('texturesSize', decimalMegabytes(entity.texturesSize));
|
||||
addColumnHTML('hasTransparent glyph', entity.hasTransparent ? TRANSPARENCY_GLYPH : null);
|
||||
addColumnHTML('isBaked glyph', entity.isBaked ? BAKED_GLYPH : null);
|
||||
addColumn('drawCalls', displayIfNonZero(entity.drawCalls));
|
||||
addColumn('hasScript glyph', entity.hasScript ? SCRIPT_GLYPH : null);
|
||||
row.addEventListener('click', onRowClicked);
|
||||
row.addEventListener('dblclick', onRowDoubleClicked);
|
||||
|
||||
|
|
Loading…
Reference in a new issue