Преглед изворни кода

Changed: model.Document move #selection init before #markers init as #selection listens to #markers.

Szymon Cofalik пре 9 година
родитељ
комит
36b2ed4a57
1 измењених фајлова са 8 додато и 8 уклоњено
  1. 8 8
      packages/ckeditor5-engine/src/model/document.js

+ 8 - 8
packages/ckeditor5-engine/src/model/document.js

@@ -58,14 +58,6 @@ export default class Document {
 		 */
 		 */
 		this.version = 0;
 		this.version = 0;
 
 
-		/**
-		 * Selection done on this document.
-		 *
-		 * @readonly
-		 * @member {module:engine/model/liveselection~LiveSelection}
-		 */
-		this.selection = new LiveSelection( this );
-
 		/**
 		/**
 		 * Schema for this document.
 		 * Schema for this document.
 		 *
 		 *
@@ -91,6 +83,14 @@ export default class Document {
 		 */
 		 */
 		this.markers = new MarkerCollection();
 		this.markers = new MarkerCollection();
 
 
+		/**
+		 * Selection done on this document.
+		 *
+		 * @readonly
+		 * @member {module:engine/model/liveselection~LiveSelection}
+		 */
+		this.selection = new LiveSelection( this );
+
 		/**
 		/**
 		 * Array of pending changes. See: {@link #enqueueChanges}.
 		 * Array of pending changes. See: {@link #enqueueChanges}.
 		 *
 		 *