File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
packages/app-frontend/src/features/timeline Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -144,9 +144,8 @@ export default defineComponent({
144
144
// Auto bottom scroll
145
145
146
146
function scrollToBottom () {
147
- if (! scroller .value ) return
148
-
149
147
requestAnimationFrame (() => {
148
+ if (! scroller .value ) return
150
149
const scrollerEl = scroller .value .$el
151
150
scrollerEl .scrollTop = scrollerEl .scrollHeight
152
151
})
Original file line number Diff line number Diff line change @@ -66,9 +66,22 @@ export function useLayers () {
66
66
return list . includes ( layer . id )
67
67
}
68
68
69
+ function resetSelectedStatus ( ) {
70
+ selectedLayer . value = null
71
+ inspectedEvent . value = null
72
+ selectedEvent . value = null
73
+ hoverLayerId . value = null
74
+ setStorage ( 'selected-layer-id' , '' )
75
+ }
76
+
69
77
function setLayerHidden ( layer : Layer , hidden : boolean ) {
70
78
const list = getHiddenLayers ( currentAppId . value )
71
79
const index = list . indexOf ( layer . id )
80
+
81
+ if ( selectedLayer . value === layer ) {
82
+ resetSelectedStatus ( )
83
+ }
84
+
72
85
if ( hidden && index === - 1 ) {
73
86
list . push ( layer . id )
74
87
} else if ( ! hidden && index !== - 1 ) {
You can’t perform that action at this time.
0 commit comments