Jelajahi Sumber

Changed: Simplified treeModel.CharacterProxy - parent is no longer a getter.

Szymon Cofalik 10 tahun lalu
induk
melakukan
4e696c7c9d
1 mengubah file dengan 4 tambahan dan 15 penghapusan
  1. 4 15
      packages/ckeditor5-engine/src/treemodel/characterproxy.js

+ 4 - 15
packages/ckeditor5-engine/src/treemodel/characterproxy.js

@@ -63,21 +63,10 @@ export default class CharacterProxy extends Node {
 		 * @property {String} character
 		 */
 		this.character = nodeListText.text.substr( index, 1 );
-	}
-
-	/**
-	 * @readonly
-	 * @property {treeModel.Element} parent
-	 * @see {@link treeModel.Node#parent}
-	 */
-	get parent() {
-		return this._nodeListText.parent;
-	}
 
-	/**
-	 * Does nothing as parent is readonly property in {@link treeModel.CharacterProxy}.
-	 */
-	set parent( parent ) {
-		/* jshint unused:false */
+		/**
+		 * @see {@link treeModel.Node#parent}
+		 */
+		this.parent = this._nodeListText.parent;
 	}
 }