Skip to content

Commit 930e42d

Browse files
committed
feat(inspector): double click to toggle expand node
1 parent abf2bf9 commit 930e42d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/app-frontend/src/features/components/ComponentTreeNode.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ export default defineComponent({
162162
<div class="min-w-max">
163163
<div
164164
ref="toggleEl"
165-
class="font-mono cursor-pointer relative z-10 rounded whitespace-nowrap flex items-center pr-2 text-sm selectable-item"
165+
class="font-mono cursor-pointer relative z-10 rounded whitespace-nowrap flex items-center pr-2 text-sm select-none selectable-item"
166166
:class="{
167167
selected,
168168
'opacity-50': instance.inactive,
@@ -171,6 +171,7 @@ export default defineComponent({
171171
paddingLeft: depth * 15 + 4 + 'px'
172172
}"
173173
@click="select()"
174+
@dblclick="toggle()"
174175
@mouseover="highlight()"
175176
@mouseleave="unhighlight()"
176177
>

packages/app-frontend/src/features/inspector/custom/CustomInspectorNode.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,14 +159,15 @@ export default defineComponent({
159159
<div class="min-w-max">
160160
<div
161161
ref="toggleEl"
162-
class="font-mono cursor-pointer relative z-10 rounded whitespace-nowrap flex items-center pr-2 text-sm selectable-item"
162+
class="font-mono cursor-pointer relative z-10 rounded whitespace-nowrap flex items-center pr-2 text-sm select-none selectable-item"
163163
:class="{
164164
selected
165165
}"
166166
:style="{
167167
paddingLeft: depth * 15 + 4 + 'px'
168168
}"
169169
@click="select()"
170+
@dblclick="toggle()"
170171
>
171172
<!-- arrow wrapper for better hit box -->
172173
<span

0 commit comments

Comments
 (0)