8
0
Просмотр исходного кода

Used Template binder as a constant when possible across the Views in the project.

Aleksander Nowodzinski 9 лет назад
Родитель
Сommit
b5a9332ee2
1 измененных файлов с 4 добавлено и 2 удалено
  1. 4 2
      packages/ckeditor5-ui/src/editableui/editableuiview.js

+ 4 - 2
packages/ckeditor5-ui/src/editableui/editableuiview.js

@@ -24,6 +24,8 @@ export default class EditableUIView extends View {
 	constructor( model, locale, editableElement ) {
 	constructor( model, locale, editableElement ) {
 		super( model, locale );
 		super( model, locale );
 
 
+		const bind = this.bind;
+
 		if ( editableElement ) {
 		if ( editableElement ) {
 			this.element = this.editableElement = editableElement;
 			this.element = this.editableElement = editableElement;
 		}
 		}
@@ -32,10 +34,10 @@ export default class EditableUIView extends View {
 			tag: 'div',
 			tag: 'div',
 			attributes: {
 			attributes: {
 				class: [
 				class: [
-					this.bind.to( 'isFocused', value => value ? 'ck-focused' : 'ck-blurred' ),
+					bind.to( 'isFocused', value => value ? 'ck-focused' : 'ck-blurred' ),
 					'ck-editor__editable'
 					'ck-editor__editable'
 				],
 				],
-				contenteditable: this.bind.to( 'isReadOnly', value => !value ),
+				contenteditable: bind.to( 'isReadOnly', value => !value ),
 			}
 			}
 		} );
 		} );