Skip to content

Commit

Permalink
Update view.js (#1285)
Browse files Browse the repository at this point in the history
  • Loading branch information
lutzroeder committed Jun 23, 2024
1 parent 5209dfc commit 62e9611
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion source/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
.sidebar-item-value-line-content { white-space: pre; word-wrap: normal; overflow: auto; display: block; }
.sidebar-item-value-expander { font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; float: right; color: #aaa; cursor: pointer; user-select: none; -webkit-user-select: none; -moz-user-select: none; padding: 4px 6px 4px 4px; }
.sidebar-item-value-expander:hover { color: #333; }
.sidebar-item-value-button { font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; float: right; color: #aaa; cursor: pointer; user-select: none; -webkit-user-select: none; -moz-user-select: none; padding: 0 0 0 3px; }
.sidebar-item-value-button { font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; float: right; color: #aaa; cursor: pointer; user-select: none; -webkit-user-select: none; -moz-user-select: none; padding: 0 3px 0 3px; }
.sidebar-item-value-button svg use { fill: #aaa; stroke: #aaa; }
.sidebar-item-value-button:hover svg use { fill: #333; stroke: #333; }
.sidebar-item-select {
Expand Down
10 changes: 6 additions & 4 deletions source/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -3177,7 +3177,7 @@ view.NodeView = class extends view.Control {
element.innerHTML = `<span class='sidebar-item-value-line-content'>name: <b>${name}</b></span>`;
element.addEventListener('pointerenter', () => this.emit('focus', this._node));
element.addEventListener('pointerleave', () => this.emit('blur', this._node));
element.addEventListener('click', () => this.emit('select', this._node));
element.addEventListener('click', () => this.emit('activate', this._node));
element.style.cursor = 'pointer';
this._element.appendChild(element);
} else {
Expand Down Expand Up @@ -3609,9 +3609,11 @@ view.FindSidebar = class extends view.Control {
}

_term(value) {
return this._exact ?
value === this._terms[0] :
this._terms.every((term) => value && value.toLowerCase().indexOf(term) !== -1);
if (this._exact) {
return value === this._terms[0];
}
value = value.toLowerCase();
return this._terms.every((term) => value.indexOf(term) !== -1);
}

_value(value) {
Expand Down

0 comments on commit 62e9611

Please sign in to comment.