Skip to content

Commit 62e9611

Browse files
committed
Update view.js (#1285)
1 parent 5209dfc commit 62e9611

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

source/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@
210210
.sidebar-item-value-line-content { white-space: pre; word-wrap: normal; overflow: auto; display: block; }
211211
.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; }
212212
.sidebar-item-value-expander:hover { color: #333; }
213-
.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; }
213+
.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; }
214214
.sidebar-item-value-button svg use { fill: #aaa; stroke: #aaa; }
215215
.sidebar-item-value-button:hover svg use { fill: #333; stroke: #333; }
216216
.sidebar-item-select {

source/view.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3177,7 +3177,7 @@ view.NodeView = class extends view.Control {
31773177
element.innerHTML = `<span class='sidebar-item-value-line-content'>name: <b>${name}</b></span>`;
31783178
element.addEventListener('pointerenter', () => this.emit('focus', this._node));
31793179
element.addEventListener('pointerleave', () => this.emit('blur', this._node));
3180-
element.addEventListener('click', () => this.emit('select', this._node));
3180+
element.addEventListener('click', () => this.emit('activate', this._node));
31813181
element.style.cursor = 'pointer';
31823182
this._element.appendChild(element);
31833183
} else {
@@ -3609,9 +3609,11 @@ view.FindSidebar = class extends view.Control {
36093609
}
36103610

36113611
_term(value) {
3612-
return this._exact ?
3613-
value === this._terms[0] :
3614-
this._terms.every((term) => value && value.toLowerCase().indexOf(term) !== -1);
3612+
if (this._exact) {
3613+
return value === this._terms[0];
3614+
}
3615+
value = value.toLowerCase();
3616+
return this._terms.every((term) => value.indexOf(term) !== -1);
36153617
}
36163618

36173619
_value(value) {

0 commit comments

Comments
 (0)