@@ -17,6 +17,8 @@ export default class DebuggerHighlighter {
17
17
const doc = editor . getDoc ( ) ;
18
18
const marks = this . activeMarks ;
19
19
20
+ const defaultTextHeight = editor . defaultTextHeight ( ) ;
21
+
20
22
for ( const trace of traces ) {
21
23
const className = "debuggermatch" ;
22
24
const location = Editor . calcRangePos (
@@ -38,12 +40,13 @@ export default class DebuggerHighlighter {
38
40
39
41
widget . style . position = "absolute" ;
40
42
widget . style . zIndex = "10" ;
41
- widget . style . height = editor . defaultTextHeight ( ) * 1.5 + "px" ;
43
+
44
+ widget . style . height = `${ defaultTextHeight * 1.5 } px` ;
42
45
widget . style . width = "1px" ;
43
46
44
47
const coords = editor . charCoords ( pos , "local" ) ;
45
- widget . style . left = coords . left + "px" ;
46
- widget . style . top = coords . top + 2 + "px" ;
48
+ widget . style . left = ` ${ coords . left } px` ;
49
+ widget . style . top = ` ${ coords . top + 2 } px` ;
47
50
48
51
editor . getWrapperElement ( ) . appendChild ( widget ) ;
49
52
@@ -59,12 +62,12 @@ export default class DebuggerHighlighter {
59
62
60
63
widget . style . position = "absolute" ;
61
64
widget . style . zIndex = "10" ;
62
- widget . style . height = editor . defaultTextHeight ( ) * 1.5 + "px" ;
63
- widget . style . width = editor . defaultCharWidth ( ) + "px" ;
65
+ widget . style . height = ` ${ defaultTextHeight * 1.5 } px` ;
66
+ widget . style . width = ` ${ editor . defaultCharWidth ( ) } px` ;
64
67
65
68
const coords = editor . charCoords ( pos , "local" ) ;
66
- widget . style . left = coords . left + "px" ;
67
- widget . style . top = coords . top + 2 + "px" ;
69
+ widget . style . left = ` ${ coords . left } px` ;
70
+ widget . style . top = ` ${ coords . top + 2 } px` ;
68
71
69
72
editor . getWrapperElement ( ) . appendChild ( widget ) ;
70
73
0 commit comments