[Fix] Updated to strolch-wc-tree 0.2.0

This commit is contained in:
Robert von Burg 2021-08-19 10:53:07 +02:00
parent 67f3dd25e5
commit fe05596b6f
2 changed files with 11 additions and 9 deletions

View File

@ -1,7 +1,7 @@
{
"name": "strolch-wc-inspector",
"description": "Strolch WebComponent Inspector",
"version": "0.22.1",
"version": "0.22.2",
"authors": ["Robert von Burg"],
"keywords": [
"strolch",
@ -20,7 +20,7 @@
"strolchjs": "strolch-li/strolchjs#^0.4.3",
"strolch-wc-styles": "strolch-li/strolch-wc-styles#^0.3.1",
"strolch-wc-debounced-input": "strolch-li/strolch-wc-debounced-input#^0.1.1",
"strolch-wc-tree": "strolch-li/strolch-wc-tree#^0.1.10",
"strolch-wc-tree": "strolch-li/strolch-wc-tree#^0.2.0",
"strolch-wc-ws-observer": "strolch-li/strolch-wc-ws-observer#^0.2.7",
"polymer": "Polymer/polymer#^1.11.3",

View File

@ -664,7 +664,7 @@
/* Private */
_getIcon: function (item) {
if (item == null || item.state == null || item.state == '') return '';
if (item == null || item.state == null || item.state === '') return '';
return this.resolveUrl('icons/' + item.state + '.png');
},
@ -672,21 +672,23 @@
/* Lifecycle */
ready: function () {
var that = this;
this.funcObj = {
getTitle: function (item) {
return item == null ? "" : "<b>" + item.type + "</b>:&#9;&#9;" + item.name;
}.bind(this),
useIcon: function (item) {
return item != null && item.state != null && item.state !== '';
},
getIcon: function (item) {
if (item == null || item.state == null || item.state == '') return '';
return that.resolveUrl('icons/' + item.state + '.png');
},
if (item == null || item.state == null || item.state === '') return '';
return this.resolveUrl('icons/' + item.state + '.png');
}.bind(this),
hasElements: function (item) {
return item != null && item.elements && item.elements.length > 0;
},
}.bind(this),
getElements: function (item) {
return item == null ? [] : (item.elements ? item.elements : []);
}
}.bind(this)
};
},
reload: function () {