@@ -982,11 +982,11 @@ function RemoteFunctions(config = {}) {
982982
983983 label . style . position = 'fixed' ;
984984 label . style . zIndex = '2147483647' ;
985- label . style . backgroundColor = 'rgba(0, 0, 0, 0.8) ' ;
986- label . style . color = 'white ' ;
985+ label . style . backgroundColor = '#2c2c2c ' ;
986+ label . style . color = '#cdcdcd ' ;
987987 label . style . padding = '4px 8px' ;
988- label . style . borderRadius = '3px ' ;
989- label . style . fontSize = '11px ' ;
988+ label . style . borderRadius = '6px ' ;
989+ label . style . fontSize = '10px ' ;
990990 label . style . fontFamily = 'monospace' ;
991991 label . style . whiteSpace = 'nowrap' ;
992992 label . style . boxShadow = '0 2px 6px rgba(0, 0, 0, 0.3)' ;
@@ -998,8 +998,16 @@ function RemoteFunctions(config = {}) {
998998 const arrowRect = arrow . getBoundingClientRect ( ) ;
999999
10001000 // default position: 10px to the right of arrow, vertically centered
1001- let labelLeft = arrowRect . right + 10 ;
1002- const labelTop = arrowRect . top + ( arrowRect . height / 2 ) - ( labelRect . height / 2 ) ;
1001+ let labelLeft = arrowRect . right + 7.5 ;
1002+ let labelTop = arrowRect . top + ( arrowRect . height / 2 ) - ( labelRect . height / 2 ) ;
1003+
1004+ // add 3px offset for horizontal arrows to prevent touching the line
1005+ const arrowChar = arrow . innerHTML ;
1006+ if ( arrowChar === '↑' ) {
1007+ labelTop -= 3 ;
1008+ } else if ( arrowChar === '↓' ) {
1009+ labelTop += 3 ;
1010+ }
10031011
10041012 // if right side overflows, we switch to the left side
10051013 if ( labelLeft + labelRect . width > window . innerWidth ) {
0 commit comments