File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -14,13 +14,26 @@ export class ColorStopControl extends Polygon {
1414 readOnly : true ,
1515 get ( ) { return true ; }
1616 } ,
17+ tooltip : {
18+ derived : true ,
19+ get ( ) {
20+ return this . editor ?. gradientValue ?. stops . length > 2
21+ ? 'Press ' + KeyHandler . prettyCombo ( 'Delete' ) + ' to remove this color stop from the gradient.'
22+ : '' ;
23+ }
24+ } ,
1725 ui : {
1826 get ( ) {
1927 return {
2028 transparent : this . getSubmorphNamed ( 'transparent' ) ,
2129 opaque : this . getSubmorphNamed ( 'opaque' )
2230 } ;
2331 }
32+ } ,
33+ expose : {
34+ get ( ) {
35+ return [ 'tooltip' ] ;
36+ }
2437 }
2538 } ;
2639 }
@@ -118,8 +131,7 @@ const ColorStop = component({
118131const SelectedColorStop = component ( ColorStop , {
119132 name : 'selected color stop' ,
120133 fill : Color . rgb ( 33 , 150 , 243 ) ,
121- borderWidth : 0 ,
122- tooltip : 'Press ' + KeyHandler . prettyCombo ( 'Delete' ) + ' to remove this color stop from the gradient.'
134+ borderWidth : 0
123135} ) ;
124136
125137export { SelectedColorStop , ColorStop , ColorCell } ;
You can’t perform that action at this time.
0 commit comments