@seafile/seafile-editor 0.3.81 → 0.3.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/table-button.js +18 -19
- package/package.json +1 -1
|
@@ -79,25 +79,26 @@ var TableButton = /*#__PURE__*/function (_Component) {
|
|
|
79
79
|
};
|
|
80
80
|
|
|
81
81
|
_this.onTableCellMouseEnter = function (rowIndex, columnIndex) {
|
|
82
|
-
var
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
82
|
+
var columnCount = columnIndex + 1,
|
|
83
|
+
rowCount = rowIndex + 1;
|
|
84
|
+
var currentMaxRowCount = rowCount + 1,
|
|
85
|
+
currentMaxColumnCount = columnCount + 1;
|
|
86
|
+
|
|
87
|
+
if (currentMaxColumnCount > 10) {
|
|
88
|
+
currentMaxColumnCount = 10;
|
|
89
|
+
} else if (currentMaxColumnCount < 4) {
|
|
90
|
+
currentMaxColumnCount = 4;
|
|
90
91
|
}
|
|
91
92
|
|
|
92
|
-
if (
|
|
93
|
-
currentMaxRowCount
|
|
94
|
-
} else if (
|
|
95
|
-
currentMaxRowCount
|
|
93
|
+
if (currentMaxRowCount > 10) {
|
|
94
|
+
currentMaxRowCount = 10;
|
|
95
|
+
} else if (currentMaxRowCount < 4) {
|
|
96
|
+
currentMaxRowCount = 4;
|
|
96
97
|
}
|
|
97
98
|
|
|
98
99
|
_this.setState({
|
|
99
|
-
columnCount:
|
|
100
|
-
rowCount:
|
|
100
|
+
columnCount: columnCount,
|
|
101
|
+
rowCount: rowCount,
|
|
101
102
|
currentMaxColumnCount: currentMaxColumnCount,
|
|
102
103
|
currentMaxRowCount: currentMaxRowCount
|
|
103
104
|
});
|
|
@@ -110,17 +111,15 @@ var TableButton = /*#__PURE__*/function (_Component) {
|
|
|
110
111
|
columnCount: -1,
|
|
111
112
|
rowCount: -1
|
|
112
113
|
};
|
|
113
|
-
_this.maxColumnCount = 10;
|
|
114
|
-
_this.maxRowCount = 10;
|
|
115
114
|
return _this;
|
|
116
115
|
}
|
|
117
116
|
|
|
118
117
|
_createClass(TableButton, [{
|
|
119
118
|
key: "createTableScaleCard",
|
|
120
119
|
value: function createTableScaleCard(props) {
|
|
121
|
-
var _this$
|
|
122
|
-
columnCount = _this$
|
|
123
|
-
rowCount = _this$
|
|
120
|
+
var _this$state2 = this.state,
|
|
121
|
+
columnCount = _this$state2.columnCount,
|
|
122
|
+
rowCount = _this$state2.rowCount;
|
|
124
123
|
return /*#__PURE__*/React.createElement("div", {
|
|
125
124
|
className: "sf-editor-table-count-card"
|
|
126
125
|
}, /*#__PURE__*/React.createElement("div", {
|