Przeglądaj źródła

Used bind.if instead of bind.to.

Oskar Wróbel 8 lat temu
rodzic
commit
3b16602fe9
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      packages/ckeditor5-ui/src/tooltip/tooltipview.js

+ 2 - 2
packages/ckeditor5-ui/src/tooltip/tooltipview.js

@@ -28,7 +28,7 @@ export default class TooltipView extends View {
 		 * @observable
 		 * @member {String} #text
 		 */
-		this.set( 'text' );
+		this.set( 'text', '' );
 
 		/**
 		 * The position of the tooltip (south or north).
@@ -59,7 +59,7 @@ export default class TooltipView extends View {
 				class: [
 					'ck-tooltip',
 					bind.to( 'position', position => 'ck-tooltip_' + position ),
-					bind.to( 'text', value => !value ? 'ck-hidden' : '' )
+					bind.if( 'text', 'ck-hidden', value => !value.trim() )
 				]
 			},
 			children: [