Răsfoiți Sursa

Used ButtonView#tooltipPosition attribute.

Aleksander Nowodzinski 8 ani în urmă
părinte
comite
8e01404dbd
1 a modificat fișierele cu 5 adăugiri și 8 ștergeri
  1. 5 8
      packages/ckeditor5-theme-lark/tests/manual/theme.js

+ 5 - 8
packages/ckeditor5-theme-lark/tests/manual/theme.js

@@ -203,17 +203,13 @@ function renderButton() {
 		tooltip: 'The content of the tooltip',
 	} ) );
 
-	const northTooltipButton = button( {
+	ui.buttonTooltip.add( button( {
 		label: 'This one too – north',
 		withText: true,
 		keystroke: 'Ctrl+N',
 		tooltip: true,
-	} );
-
-	northTooltipButton.init();
-	northTooltipButton.tooltipView.position = 'n';
-
-	ui.buttonTooltip.add( northTooltipButton );
+		tooltipPosition: 'n'
+	} ) );
 }
 
 function renderDropdown() {
@@ -355,11 +351,12 @@ function button( {
 	withText = true,
 	keystroke = null,
 	tooltip,
+	tooltipPosition = 's',
 	icon
 } = {} ) {
 	const button = new ButtonView();
 
-	button.set( { label, isEnabled, isOn, withText, icon, keystroke, tooltip } );
+	button.set( { label, isEnabled, isOn, withText, icon, keystroke, tooltip, tooltipPosition } );
 
 	return button;
 }