Browse Source

Merge pull request #817 from cdswyda/fix/postil

Fix/postil 批注相关bug修复
master
Dushusir 4 years ago
committed by GitHub
parent
commit
f379abdc1f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      src/controllers/postil.js
  2. 2
      src/global/extend.js

7
src/controllers/postil.js

@ -222,8 +222,8 @@ const luckysheetPostil = {
fromY = 2; fromY = 2;
} }
let width = _this.defaultWidth * Store.zoomRatio let width = postil["width"] == null ? _this.defaultWidth * Store.zoomRatio : postil["width"] * Store.zoomRatio;
let height = _this.defaultHeight * Store.zoomRatio let height = postil["height"] == null ? _this.defaultHeight * Store.zoomRatio : postil["height"] * Store.zoomRatio;
let size = _this.getArrowCanvasSize(fromX, fromY, toX, toY); let size = _this.getArrowCanvasSize(fromX, fromY, toX, toY);
@ -872,6 +872,9 @@ const luckysheetPostil = {
let value = $("#" + id).find(".formulaInputFocus").html().replaceAll('<div>', '\n').replaceAll(/<(.*)>.*?|<(.*) \/>/g, '').trim(); let value = $("#" + id).find(".formulaInputFocus").html().replaceAll('<div>', '\n').replaceAll(/<(.*)>.*?|<(.*) \/>/g, '').trim();
// Hook function // Hook function
if(!method.createHookFunction('commentUpdateBefore',r,c,value)){ if(!method.createHookFunction('commentUpdateBefore',r,c,value)){
if (!Store.flowdata[r][c].ps.isshow) {
$("#" + id).remove();
}
return; return;
} }

2
src/global/extend.js

@ -640,6 +640,7 @@ function luckysheetextendtable(type, index, value, direction, sheetIndex) {
for(let c = 0; c < d[0].length; c++){ for(let c = 0; c < d[0].length; c++){
let cell = curRow[c], let cell = curRow[c],
templateCell = cell ? {...cell, v: '', m: ''} : Store.defaultCell; templateCell = cell ? {...cell, v: '', m: ''} : Store.defaultCell;
delete templateCell.ps;
row.push(templateCell); row.push(templateCell);
} }
var cellBorderConfig = []; var cellBorderConfig = [];
@ -813,6 +814,7 @@ function luckysheetextendtable(type, index, value, direction, sheetIndex) {
for(let r = 0; r < d.length; r++){ for(let r = 0; r < d.length; r++){
let cell = curd[r][index], let cell = curd[r][index],
templateCell = cell ? {...cell, v: '', m: ''} : Store.defaultCell; templateCell = cell ? {...cell, v: '', m: ''} : Store.defaultCell;
delete templateCell.ps;
col.push(templateCell); col.push(templateCell);
} }
var cellBorderConfig = []; var cellBorderConfig = [];

Loading…
Cancel
Save