|
|
@@ -62,34 +62,6 @@ export default class TableCellPropertiesView extends View {
|
|
|
constructor( locale ) {
|
|
|
super( locale );
|
|
|
|
|
|
- const { borderStyleDropdown, borderWidthInput, borderColorInput, borderRowLabel } = this._createBorderFields();
|
|
|
- const { widthInput, operatorLabel, heightInput, dimensionsLabel } = this._createDimensionFields();
|
|
|
- const { horizontalAlignmentToolbar, verticalAlignmentToolbar, alignmentLabel } = this._createAlignmentFields();
|
|
|
-
|
|
|
- /**
|
|
|
- * Tracks information about the DOM focus in the form.
|
|
|
- *
|
|
|
- * @readonly
|
|
|
- * @member {module:utils/focustracker~FocusTracker}
|
|
|
- */
|
|
|
- this.focusTracker = new FocusTracker();
|
|
|
-
|
|
|
- /**
|
|
|
- * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
|
|
|
- *
|
|
|
- * @readonly
|
|
|
- * @member {module:utils/keystrokehandler~KeystrokeHandler}
|
|
|
- */
|
|
|
- this.keystrokes = new KeystrokeHandler();
|
|
|
-
|
|
|
- /**
|
|
|
- * A collection of child views in the form.
|
|
|
- *
|
|
|
- * @readonly
|
|
|
- * @type {module:ui/viewcollection~ViewCollection}
|
|
|
- */
|
|
|
- this.children = this.createCollection();
|
|
|
-
|
|
|
this.set( {
|
|
|
/**
|
|
|
* The value of the cell border style.
|
|
|
@@ -173,6 +145,34 @@ export default class TableCellPropertiesView extends View {
|
|
|
verticalAlignment: 'middle'
|
|
|
} );
|
|
|
|
|
|
+ const { borderStyleDropdown, borderWidthInput, borderColorInput, borderRowLabel } = this._createBorderFields();
|
|
|
+ const { widthInput, operatorLabel, heightInput, dimensionsLabel } = this._createDimensionFields();
|
|
|
+ const { horizontalAlignmentToolbar, verticalAlignmentToolbar, alignmentLabel } = this._createAlignmentFields();
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Tracks information about the DOM focus in the form.
|
|
|
+ *
|
|
|
+ * @readonly
|
|
|
+ * @member {module:utils/focustracker~FocusTracker}
|
|
|
+ */
|
|
|
+ this.focusTracker = new FocusTracker();
|
|
|
+
|
|
|
+ /**
|
|
|
+ * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
|
|
|
+ *
|
|
|
+ * @readonly
|
|
|
+ * @member {module:utils/keystrokehandler~KeystrokeHandler}
|
|
|
+ */
|
|
|
+ this.keystrokes = new KeystrokeHandler();
|
|
|
+
|
|
|
+ /**
|
|
|
+ * A collection of child views in the form.
|
|
|
+ *
|
|
|
+ * @readonly
|
|
|
+ * @type {module:ui/viewcollection~ViewCollection}
|
|
|
+ */
|
|
|
+ this.children = this.createCollection();
|
|
|
+
|
|
|
/**
|
|
|
* A dropdown that allows selecting the style of the table cell border.
|
|
|
*
|
|
|
@@ -494,6 +494,15 @@ export default class TableCellPropertiesView extends View {
|
|
|
this.borderColor = borderColorInput.view.element.value;
|
|
|
} );
|
|
|
|
|
|
+ // Reset the border color and width fields when style is "none".
|
|
|
+ // https://github.com/ckeditor/ckeditor5/issues/6227
|
|
|
+ this.on( 'change:borderStyle', ( evt, name, value ) => {
|
|
|
+ if ( value === 'none' ) {
|
|
|
+ this.borderColor = '';
|
|
|
+ this.borderWidth = '';
|
|
|
+ }
|
|
|
+ } );
|
|
|
+
|
|
|
return {
|
|
|
borderRowLabel,
|
|
|
borderStyleDropdown,
|