Browse Source

Add prefix model to missingo ones.

Mateusz Samsel 6 years ago
parent
commit
86259f155e

+ 1 - 1
packages/ckeditor5-engine/src/model/batch.js

@@ -87,6 +87,6 @@ export default class Batch {
 	 * @returns {Boolean}
 	 */
 	is( type ) {
-		return type == 'batch';
+		return type == 'batch' || type == 'model:batch';
 	}
 }

+ 1 - 1
packages/ckeditor5-engine/src/model/differ.js

@@ -526,7 +526,7 @@ export default class Differ {
 	 * @returns {Boolean}
 	 */
 	is( type ) {
-		return type == 'differ';
+		return type == 'differ' || type == 'model:differ';
 	}
 
 	/**

+ 1 - 1
packages/ckeditor5-engine/src/model/history.js

@@ -104,7 +104,7 @@ export default class History {
 	 * @returns {Boolean}
 	 */
 	is( type ) {
-		return type == 'history';
+		return type == 'history' || type == 'mdoel:history';
 	}
 
 	/**

+ 2 - 2
packages/ckeditor5-engine/src/model/markercollection.js

@@ -79,7 +79,7 @@ export default class MarkerCollection {
 	 * @returns {Boolean}
 	 */
 	is( type ) {
-		return type == 'markerCollection';
+		return type == 'markerCollection' || type == 'model:markerCollection';
 	}
 
 	/**
@@ -465,7 +465,7 @@ class Marker {
 	 * @returns {Boolean}
 	 */
 	is( type ) {
-		return type == 'marker';
+		return type == 'marker' || type == 'model:marker';
 	}
 
 	/**

+ 1 - 1
packages/ckeditor5-engine/src/model/schema.js

@@ -194,7 +194,7 @@ export default class Schema {
 	 * @returns {Boolean}
 	 */
 	is( type ) {
-		return type == 'schema';
+		return type == 'schema' || type == 'model:schema';
 	}
 
 	/**

+ 1 - 0
packages/ckeditor5-engine/tests/model/batch.js

@@ -70,6 +70,7 @@ describe( 'Batch', () => {
 
 		it( 'should return true for "batch"', () => {
 			expect( batch.is( 'batch' ) ).to.be.true;
+			expect( batch.is( 'model:batch' ) ).to.be.true;
 		} );
 
 		it( 'should return false for incorrect values', () => {

+ 1 - 0
packages/ckeditor5-engine/tests/model/differ.js

@@ -39,6 +39,7 @@ describe( 'Differ', () => {
 	describe( 'is()', () => {
 		it( 'should return true for "differ"', () => {
 			expect( differ.is( 'differ' ) ).to.be.true;
+			expect( differ.is( 'model:differ' ) ).to.be.true;
 		} );
 
 		it( 'should return false for incorrect values', () => {

+ 1 - 0
packages/ckeditor5-engine/tests/model/history.js

@@ -182,6 +182,7 @@ describe( 'History', () => {
 	describe( 'is()', () => {
 		it( 'should return true for "history"', () => {
 			expect( history.is( 'history' ) ).to.be.true;
+			expect( history.is( 'model:history' ) ).to.be.true;
 		} );
 
 		it( 'should return false for incorrect values', () => {

+ 2 - 0
packages/ckeditor5-engine/tests/model/markercollection.js

@@ -149,6 +149,7 @@ describe( 'MarkerCollection', () => {
 	describe( 'is()', () => {
 		it( 'should return true for "markerCollection"', () => {
 			expect( markers.is( 'markerCollection' ) ).to.be.true;
+			expect( markers.is( 'model:markerCollection' ) ).to.be.true;
 		} );
 
 		it( 'should return false for incorrect values', () => {
@@ -433,6 +434,7 @@ describe( 'Marker', () => {
 
 		it( 'should return true for "marker"', () => {
 			expect( marker.is( 'marker' ) ).to.be.true;
+			expect( marker.is( 'model:marker' ) ).to.be.true;
 		} );
 
 		it( 'should return false for incorrect values', () => {

+ 1 - 0
packages/ckeditor5-engine/tests/model/schema.js

@@ -314,6 +314,7 @@ describe( 'Schema', () => {
 	describe( 'is()', () => {
 		it( 'should return true for "schema"', () => {
 			expect( schema.is( 'schema' ) ).to.be.true;
+			expect( schema.is( 'model:schema' ) ).to.be.true;
 		} );
 
 		it( 'should return false for incorrect values', () => {