8
0
Просмотр исходного кода

Fix table structure samples in JSDoc comments.

Maciej Gołaszewski 5 лет назад
Родитель
Сommit
064bbd8ec0

+ 16 - 16
packages/ckeditor5-table/src/utils/selection.js

@@ -125,13 +125,13 @@ export function getColumnIndexes( tableCells ) {
  *
  * In a table below:
  *
- *   ┌───┬───┬───┬───┐
- *   │ a │ b │ c │ d │
- *   ├───┴───┼───┤   │
- *   │ e     │ f │   │
- *   │       ├───┼───┤
- *   │       │ g │ h │
- *   └───────┴───┴───┘
+ *		┌───┬───┬───┬───┐
+ *		│ a │ b │ c │ d │
+ *		├───┴───┼───┤   │
+ *		│ e     │ f │   │
+ *		│       ├───┼───┤
+ *		│       │ g │ h │
+ *		└───────┴───┴───┘
  *
  * Valid selections are these which create a solid rectangle (without gaps), such as:
  *   - a, b (two horizontal cells)
@@ -235,15 +235,15 @@ function getBiggestRectangleArea( rows, columns ) {
 // For instance, in the table below valid selections consist of cells with the same letter only.
 // So, a-a (same heading row and column) or d-d (body cells) are valid while c-d or a-b are not.
 //
-//    header columns
-//     ↓   ↓
-//   ┌───┬───┬───┬───┐
-//   │ a │ a │ b │ b │  ← header row
-//   ├───┼───┼───┼───┤
-//   │ c │ c │ d │ d │
-//   ├───┼───┼───┼───┤
-//   │ c │ c │ d │ d │
-//   └───┴───┴───┴───┘
+//		 header columns
+//		  ↓   ↓
+//		┌───┬───┬───┬───┐
+//		│ a │ a │ b │ b │  ← header row
+//		├───┼───┼───┼───┤
+//		│ c │ c │ d │ d │
+//		├───┼───┼───┼───┤
+//		│ c │ c │ d │ d │
+//		└───┴───┴───┴───┘
 function areCellInTheSameTableSection( tableCells ) {
 	const table = findAncestor( 'table', tableCells[ 0 ] );
 

+ 25 - 25
packages/ckeditor5-table/src/utils/structure.js

@@ -106,17 +106,17 @@ export function cropTableToDimensions( sourceTable, cropDimensions, writer, tabl
  *
  * In a table below, passing `overlapRow = 3`
  *
- *       ┌───┬───┬───┬───┬───┐
- *    0  │ a │ b │ c │ d │ e │
- *       │   ├───┼───┼───┼───┤
- *    1  │   │ f │ g │ h │ i │
- *       ├───┤   ├───┼───┤   │
- *    2  │ j │   │ k │ l │   │
- *       │   │   │   ├───┼───┤
- *    3  │   │   │   │ m │ n │  <- overlap row to check
- *       ├───┼───┤   │   ├───│
- *    4  │ o │ p │   │   │ q │
- *       └───┴───┴───┴───┴───┘
+ *		   ┌───┬───┬───┬───┬───┐
+ *		0  │ a │ b │ c │ d │ e │
+ *		   │   ├───┼───┼───┼───┤
+ *		1  │   │ f │ g │ h │ i │
+ *		   ├───┤   ├───┼───┤   │
+ *		2  │ j │   │ k │ l │   │
+ *		   │   │   │   ├───┼───┤
+ *		3  │   │   │   │ m │ n │  <- overlap row to check
+ *		   ├───┼───┤   │   ├───│
+ *		4  │ o │ p │   │   │ q │
+ *		   └───┴───┴───┴───┴───┘
  *
  * will return slot info for cells: "j", "f", "k".
  *
@@ -198,20 +198,20 @@ export function splitHorizontally( tableCell, splitRow, writer ) {
  *
  * In a table below, passing `overlapColumn = 3`
  *
- *      0   1   2   3   4
- *    ┌───────┬───────┬───┐
- *    │ a     │ b     │ c │
- *    │───┬───┴───────┼───┤
- *    │ d │ e         │ f │
- *    ├───┼───┬───────┴───┤
- *    │ g │ h │ i         │
- *    ├───┼───┼───┬───────┤
- *    │ j │ k │ l │ m     │
- *    ├───┼───┴───┼───┬───┤
- *    │ n │ o     │ p │ q │
- *    └───┴───────┴───┴───┘
- *                  ^
- *                  Overlap column to check
+ *		  0   1   2   3   4
+ *		┌───────┬───────┬───┐
+ *		│ a     │ b     │ c │
+ *		│───┬───┴───────┼───┤
+ *		│ d │ e         │ f │
+ *		├───┼───┬───────┴───┤
+ *		│ g │ h │ i         │
+ *		├───┼───┼───┬───────┤
+ *		│ j │ k │ l │ m     │
+ *		├───┼───┴───┼───┬───┤
+ *		│ n │ o     │ p │ q │
+ *		└───┴───────┴───┴───┘
+ *		              ^
+ *		              Overlap column to check
  *
  * will return slot info for cells: "b", "e", "i".
  *