|
@@ -278,11 +278,11 @@ const getPenData = (data: any) => {
|
|
|
if (!props.pen.styles) {
|
|
|
props.pen.styles = [];
|
|
|
}
|
|
|
- if (props.pen.calculative.activeCell) {
|
|
|
- cell.value.col = props.pen.calculative.activeCell.col;
|
|
|
- cell.value.row = props.pen.calculative.activeCell.row;
|
|
|
+ if (props.pen.calculative.activeCol !== undefined) {
|
|
|
+ cell.value.col = props.pen.calculative.activeCol;
|
|
|
+ cell.value.row = undefined;
|
|
|
let found = props.pen.styles.findIndex((item: any) => {
|
|
|
- return item.row === cell.value.row && item.col === cell.value.col;
|
|
|
+ return item.row === undefined && item.col === cell.value.col;
|
|
|
});
|
|
|
if (found !== -1) {
|
|
|
cell.value.background = props.pen.styles[found].background;
|
|
@@ -293,11 +293,12 @@ const getPenData = (data: any) => {
|
|
|
cell.value.textColor = undefined;
|
|
|
cell.value.fontSize = undefined;
|
|
|
}
|
|
|
- } else if (props.pen.calculative.activeCol !== undefined) {
|
|
|
- cell.value.col = props.pen.calculative.activeCol;
|
|
|
- cell.value.row = undefined;
|
|
|
+ } else if (props.pen.calculative.activeRow !== undefined) {
|
|
|
+ cell.value.col = undefined;
|
|
|
+ cell.value.row = props.pen.calculative.activeRow;
|
|
|
+
|
|
|
let found = props.pen.styles.findIndex((item: any) => {
|
|
|
- return item.row === undefined && item.col === cell.value.col;
|
|
|
+ return item.row === cell.value.row && item.col === undefined;
|
|
|
});
|
|
|
if (found !== -1) {
|
|
|
cell.value.background = props.pen.styles[found].background;
|
|
@@ -308,12 +309,11 @@ const getPenData = (data: any) => {
|
|
|
cell.value.textColor = undefined;
|
|
|
cell.value.fontSize = undefined;
|
|
|
}
|
|
|
- } else if (props.pen.calculative.activeRow !== undefined) {
|
|
|
- cell.value.col = undefined;
|
|
|
- cell.value.row = props.pen.calculative.activeRow;
|
|
|
-
|
|
|
+ } else if (props.pen.calculative.activeCell) {
|
|
|
+ cell.value.col = props.pen.calculative.activeCell.col;
|
|
|
+ cell.value.row = props.pen.calculative.activeCell.row;
|
|
|
let found = props.pen.styles.findIndex((item: any) => {
|
|
|
- return item.row === cell.value.row && item.col === undefined;
|
|
|
+ return item.row === cell.value.row && item.col === cell.value.col;
|
|
|
});
|
|
|
if (found !== -1) {
|
|
|
cell.value.background = props.pen.styles[found].background;
|