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

This binding isn't useful anymore as there's no editable collection.

Piotrek Koszuliński 9 лет назад
Родитель
Сommit
2e92567c04

+ 0 - 29
packages/ckeditor5-ui/src/bindings/stickytoolbar.js

@@ -1,29 +0,0 @@
-/**
- * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md.
- */
-
-'use strict';
-
-import Toolbar from './toolbar.js';
-
-/**
- * The editor sticky toolbar controller class.
- *
- * @memberOf ui.bindings
- * @extends ui.toolbar.Toolbar
- */
-export default class StickyToolbar extends Toolbar {
-	/**
-	 * Creates a new toolbar instance.
-	 *
-	 * @param {ui.Model} model
-	 * @param {ui.View} view
-	 * @param {ckeditor5.Editor} editor
-	 */
-	constructor( model, view, editor ) {
-		super( model, view, editor );
-
-		model.bind( 'isActive' ).to( editor.editing.view.getRoot(), 'isFocused' );
-	}
-}

+ 0 - 38
packages/ckeditor5-ui/tests/bindings/stickytoolbar.js

@@ -1,38 +0,0 @@
-/**
- * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md.
- */
-
-/* bender-tags: ui, stickytoolbar */
-
-'use strict';
-
-import Editor from '/ckeditor5/editor.js';
-import Editable from '/ckeditor5/editable.js';
-import Model from '/ckeditor5/ui/model.js';
-import View from '/ckeditor5/ui/view.js';
-import StickyToolbar from '/ckeditor5/ui/bindings/stickytoolbar.js';
-
-describe( 'StickyToolbar', () => {
-	let toolbar, view, model, editor, editable;
-
-	beforeEach( () => {
-		editor = new Editor();
-		editable = new Editable( editor, 'foo' );
-		model = new Model();
-		view = new View( model );
-		toolbar = new StickyToolbar( model, view, editor );
-	} );
-
-	describe( 'constructor', () => {
-		it( 'binds model#isActive to editor.editables#current', () => {
-			expect( model.isActive ).to.be.false;
-
-			editor.editables.current = editable;
-			expect( model.isActive ).to.be.true;
-
-			editor.editables.current = null;
-			expect( model.isActive ).to.be.false;
-		} );
-	} );
-} );