@@ -7054,7 +7054,7 @@ export class Canvas {
7054
7054
textRect . x + this . store . data . x - ( pen . textLeft || 0 ) + 'px' ; //+ 5
7055
7055
this . inputParent . style . top =
7056
7056
textRect . y + this . store . data . y - ( pen . textTop || 0 ) + 'px' ; //+ 5
7057
- let _width = textRect . width + ( pen . textLeft || 0 ) ;
7057
+ let _width = textRect . width ; // + (pen.textLeft || 0);
7058
7058
this . inputParent . style . width = ( _width < 0 ? 12 : _width ) + 'px' ; //(textRect.width < pen.width ? 0 : 10)
7059
7059
this . inputParent . style . height = textRect . height + ( pen . textTop || 0 ) + 'px' ; // (textRect.height < pen.height ? 0 : 10)
7060
7060
this . inputParent . style . zIndex = '9999' ;
@@ -7073,6 +7073,8 @@ export class Canvas {
7073
7073
if ( ! this . store . data . locked ) {
7074
7074
this . inputRight . style . display = 'none' ;
7075
7075
}
7076
+ this . dropdown . style . background = pen . dropdownBackground || '#fff' ;
7077
+ this . dropdown . style . color = pen . dropdownColor || '#bdc7db' ;
7076
7078
this . setDropdownList ( ) ;
7077
7079
} else {
7078
7080
this . inputRight . style . display = 'none' ;
@@ -7550,6 +7552,15 @@ export class Canvas {
7550
7552
li . onmousedown = this . stopPropagation ;
7551
7553
li . dataset . i = index + '' ;
7552
7554
li . onclick = this . selectDropdown ;
7555
+ const pen = this . store . pens [ this . inputDiv . dataset . penId ] ;
7556
+ li . onmouseenter = ( ) => {
7557
+ li . style . background = pen . dropdownHoverBackground || '#eee' ;
7558
+ li . style . color = pen . dropdownHoverColor || '#bdc7db' ;
7559
+ } ;
7560
+ li . onmouseleave = ( ) => {
7561
+ li . style . background = pen . dropdownBackground || '#fff' ;
7562
+ li . style . color = pen . dropdownColor || '#bdc7db' ;
7563
+ } ;
7553
7564
this . dropdown . appendChild ( li ) ;
7554
7565
}
7555
7566
0 commit comments