Jelajahi Sumber

Refactor static fields of TableSelection class.

Maciej Gołaszewski 6 tahun lalu
induk
melakukan
c4ab8d3f68
1 mengubah file dengan 12 tambahan dan 5 penghapusan
  1. 12 5
      packages/ckeditor5-table/src/tableselection.js

+ 12 - 5
packages/ckeditor5-table/src/tableselection.js

@@ -27,11 +27,8 @@ export default class TableSelection extends Plugin {
 	/**
 	 * @inheritDoc
 	 */
-	constructor( editor ) {
-		super( editor );
-
-		this._isSelecting = false;
-		this._highlighted = new Set();
+	static get pluginName() {
+		return 'TableSelection';
 	}
 
 	/**
@@ -41,6 +38,16 @@ export default class TableSelection extends Plugin {
 		return [ TableUtils ];
 	}
 
+	/**
+	 * @inheritDoc
+	 */
+	constructor( editor ) {
+		super( editor );
+
+		this._isSelecting = false;
+		this._highlighted = new Set();
+	}
+
 	/**
 	 * Flag indicating that table selection is selecting valid ranges in table cell.
 	 *