File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 79
79
}
80
80
}
81
81
82
+ .has-highlighted-span {
83
+ box-shadow : 0 0 4px 2px hotpink;
84
+ }
85
+
82
86
.highlight-span {
83
87
box-shadow :
84
88
0 0 2px 1px hotpink,
Original file line number Diff line number Diff line change @@ -225,11 +225,12 @@ const store = createStore(NS, {
225
225
} ,
226
226
} ,
227
227
228
- /** @param {MouseEvent } e */
229
- handleSpanClear ( e ) {
230
- /** @type {HTMLElement } */ (
228
+ handleSpanClear ( ) {
229
+ const el = /** @type {HTMLElement } */ (
231
230
document . getElementById ( 'processed-html' )
232
- ) . textContent = store . state . hoverSpan ;
231
+ ) ;
232
+ el . classList . remove ( 'has-highlighted-span' ) ;
233
+ el . textContent = store . state . hoverSpan ;
233
234
} ,
234
235
235
236
/** @param {MouseEvent } e */
@@ -257,6 +258,7 @@ const store = createStore(NS, {
257
258
const el = /** @type {HTMLElement } */ (
258
259
document . getElementById ( 'processed-html' )
259
260
) ;
261
+ el . classList . add ( 'has-highlighted-span' ) ;
260
262
el . replaceChildren ( before , highlightCurrent , after ) ;
261
263
} ,
262
264
You can’t perform that action at this time.
0 commit comments