ソースを参照

Aligned TooltipView to the View#render API.

Aleksander Nowodzinski 8 年 前
コミット
0d9610fc6f

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

@@ -8,7 +8,6 @@
  */
 
 import View from '../view';
-import Template from '../template';
 
 /**
  * The tooltip view class.
@@ -53,7 +52,7 @@ export default class TooltipView extends View {
 
 		const bind = this.bindTemplate;
 
-		this.template = new Template( {
+		this.setTemplate( {
 			tag: 'span',
 			attributes: {
 				class: [

+ 1 - 0
packages/ckeditor5-ui/tests/tooltip/tooltipview.js

@@ -10,6 +10,7 @@ describe( 'TooltipView', () => {
 
 	beforeEach( () => {
 		view = new TooltipView();
+		view.render();
 		text = view.element.firstChild;
 	} );