|
|
@ -17,7 +17,6 @@ import {isInlineStringCell} from './inlineString'; |
|
|
import Store from '../store'; |
|
|
import Store from '../store'; |
|
|
|
|
|
|
|
|
export function luckysheetupdateCell(row_index1, col_index1, d, cover, isnotfocus) { |
|
|
export function luckysheetupdateCell(row_index1, col_index1, d, cover, isnotfocus) { |
|
|
|
|
|
|
|
|
if(!checkProtectionLocked(row_index1, col_index1, Store.currentSheetIndex)){ |
|
|
if(!checkProtectionLocked(row_index1, col_index1, Store.currentSheetIndex)){ |
|
|
$("#luckysheet-functionbox-cell").blur(); |
|
|
$("#luckysheet-functionbox-cell").blur(); |
|
|
return; |
|
|
return; |
|
|
@ -27,8 +26,6 @@ export function luckysheetupdateCell(row_index1, col_index1, d, cover, isnotfocu |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//数据验证
|
|
|
//数据验证
|
|
|
if(dataVerificationCtrl.dataVerification != null && dataVerificationCtrl.dataVerification[row_index1 + '_' + col_index1] != null){ |
|
|
if(dataVerificationCtrl.dataVerification != null && dataVerificationCtrl.dataVerification[row_index1 + '_' + col_index1] != null){ |
|
|
let dataVerificationItem = dataVerificationCtrl.dataVerification[row_index1 + '_' + col_index1]; |
|
|
let dataVerificationItem = dataVerificationCtrl.dataVerification[row_index1 + '_' + col_index1]; |
|
|
@ -41,7 +38,12 @@ export function luckysheetupdateCell(row_index1, col_index1, d, cover, isnotfocu |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
let size = getColumnAndRowSize(row_index1, col_index1, d); |
|
|
let size = getColumnAndRowSize(row_index1, col_index1, d); |
|
|
let row = size.row, row_pre = size.row_pre, col = size.col, col_pre = size.col_pre, row_index = size.row_index, col_index = size.col_index; |
|
|
let row = size.row, |
|
|
|
|
|
row_pre = size.row_pre, |
|
|
|
|
|
col = size.col, |
|
|
|
|
|
col_pre = size.col_pre, |
|
|
|
|
|
row_index = size.row_index, |
|
|
|
|
|
col_index = size.col_index; |
|
|
|
|
|
|
|
|
if($("#luckysheet-dropCell-icon").is(":visible")){ |
|
|
if($("#luckysheet-dropCell-icon").is(":visible")){ |
|
|
$("#luckysheet-dropCell-icon").remove(); |
|
|
$("#luckysheet-dropCell-icon").remove(); |
|
|
@ -56,14 +58,24 @@ export function luckysheetupdateCell(row_index1, col_index1, d, cover, isnotfocu |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
let left = col_pre + container_offset.left + Store.rowHeaderWidth - scrollLeft - 2; |
|
|
|
|
|
if(col_index1 <= luckysheetFreezen.freezenverticaldata[1]){ |
|
|
|
|
|
left = col_pre + container_offset.left + Store.rowHeaderWidth - 2; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
let top = row_pre + container_offset.top + Store.infobarHeight + Store.toolbarHeight + Store.calculatebarHeight + Store.columeHeaderHeight - scrollTop - 2; |
|
|
|
|
|
if(row_index1 <= luckysheetFreezen.freezenhorizontaldata[1]){ |
|
|
|
|
|
top = row_pre + container_offset.top + Store.infobarHeight + Store.toolbarHeight + Store.calculatebarHeight + Store.columeHeaderHeight - 2; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
let input_postition = { |
|
|
let input_postition = { |
|
|
"min-width": col - col_pre+ 1- 8, |
|
|
"min-width": col - col_pre+ 1- 8, |
|
|
"min-height": row - row_pre + 1- 4, |
|
|
"min-height": row - row_pre + 1- 4, |
|
|
|
|
|
|
|
|
"max-width": winW + scrollLeft - col_pre - 20 - Store.rowHeaderWidth, |
|
|
"max-width": winW + scrollLeft - col_pre - 20 - Store.rowHeaderWidth, |
|
|
"max-height": winH + scrollTop - row_pre - 20 - 15 - Store.toolbarHeight - Store.infobarHeight - Store.calculatebarHeight - Store.sheetBarHeight - Store.statisticBarHeight, |
|
|
"max-height": winH + scrollTop - row_pre - 20 - 15 - Store.toolbarHeight - Store.infobarHeight - Store.calculatebarHeight - Store.sheetBarHeight - Store.statisticBarHeight, |
|
|
"left": col_pre + container_offset.left + Store.rowHeaderWidth - scrollLeft - 2, |
|
|
"left": left, |
|
|
"top": row_pre + container_offset.top + Store.infobarHeight + Store.toolbarHeight + Store.calculatebarHeight + Store.columeHeaderHeight - scrollTop - 2, |
|
|
"top": top, |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
let inputContentScale = { |
|
|
let inputContentScale = { |
|
|
@ -194,8 +206,6 @@ export function luckysheetupdateCell(row_index1, col_index1, d, cover, isnotfocu |
|
|
input_postition["min-width"] = input_postition["max-width"]; |
|
|
input_postition["min-width"] = input_postition["max-width"]; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if((value == null || value.toString() == "") && !cover){ |
|
|
if((value == null || value.toString() == "") && !cover){ |
|
|
value = "<br/>"; |
|
|
value = "<br/>"; |
|
|
} |
|
|
} |
|
|
@ -242,7 +252,6 @@ export function luckysheetupdateCell(row_index1, col_index1, d, cover, isnotfocu |
|
|
cleargridelement(); |
|
|
cleargridelement(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export function setCenterInputPosition(row_index, col_index, d){ |
|
|
export function setCenterInputPosition(row_index, col_index, d){ |
|
|
if(row_index==null ||col_index==null){ |
|
|
if(row_index==null ||col_index==null){ |
|
|
return; |
|
|
return; |
|
|
@ -294,9 +303,11 @@ export function getColumnAndRowSize(row_index, col_index, d){ |
|
|
row_pre = row_index - 1 == -1 ? 0 : Store.visibledatarow[row_index - 1]; |
|
|
row_pre = row_index - 1 == -1 ? 0 : Store.visibledatarow[row_index - 1]; |
|
|
let col = Store.visibledatacolumn[col_index], |
|
|
let col = Store.visibledatacolumn[col_index], |
|
|
col_pre = col_index - 1 == -1 ? 0 : Store.visibledatacolumn[col_index - 1]; |
|
|
col_pre = col_index - 1 == -1 ? 0 : Store.visibledatacolumn[col_index - 1]; |
|
|
|
|
|
|
|
|
if(d == null){ |
|
|
if(d == null){ |
|
|
d = Store.flowdata; |
|
|
d = Store.flowdata; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
let margeset = menuButton.mergeborer(d, row_index, col_index); |
|
|
let margeset = menuButton.mergeborer(d, row_index, col_index); |
|
|
if(!!margeset){ |
|
|
if(!!margeset){ |
|
|
row = margeset.row[1]; |
|
|
row = margeset.row[1]; |
|
|
|