Fix swapped open / closed icons in tree

This commit is contained in:
nathan 2023-01-09 13:19:40 -07:00
parent 9722716d1a
commit 56f84f2fdd

View File

@ -918,9 +918,10 @@ export class et2_tree extends et2_inputWidget
*/
setImages(_leaf? : string, _closed? : string, _open? : string, _id? : string)
{
let images = [_leaf || 'dhtmlxtree/leaf', _closed || 'dhtmlxtree/folderClosed', _open || 'dhtmlxtree/folderOpen'];
// NOTE: The image order for open/closed as documented in dhtmltree is backwards
let images = [_leaf || 'dhtmlxtree/leaf', _open || 'dhtmlxtree/folderOpen', _closed || 'dhtmlxtree/folderClosed'];
let image_extensions = /\.(gif|png|jpe?g|svg)/i;
for(let i=0; i < 3; ++i)
for(let i = 0; i < 3; ++i)
{
let image = images[i];
if (!image.match(image_extensions))