' +
'
' +
'
' +
@@ -507,10 +513,10 @@ const luckysheetPostil = {
let toX = col;
let toY = row_pre;
- let left = postil["left"] == null ? toX + 18 : postil["left"];
- let top = postil["top"] == null ? toY - 18 : postil["top"];
- let width = postil["width"] == null ? _this.defaultWidth : postil["width"];
- let height = postil["height"] == null ? _this.defaultHeight : postil["height"];
+ let left = postil["left"] == null ? toX + 18 * Store.zoomRatio : postil["left"] * Store.zoomRatio;
+ let top = postil["top"] == null ? toY - 18 * Store.zoomRatio : postil["top"] * Store.zoomRatio;
+ let width = postil["width"] == null ? _this.defaultWidth * Store.zoomRatio : postil["width"] * Store.zoomRatio;
+ let height = postil["height"] == null ? _this.defaultHeight * Store.zoomRatio : postil["height"] * Store.zoomRatio;
let value = postil["value"] == null ? "" : postil["value"];
if(top < 0){
@@ -609,10 +615,10 @@ const luckysheetPostil = {
let toX = col;
let toY = row_pre;
- let left = postil["left"] == null ? toX + 18 : postil["left"];
- let top = postil["top"] == null ? toY - 18 : postil["top"];
- let width = postil["width"] == null ? _this.defaultWidth : postil["width"];
- let height = postil["height"] == null ? _this.defaultHeight : postil["height"];
+ let left = postil["left"] == null ? toX + 18 * Store.zoomRatio : postil["left"] * Store.zoomRatio;
+ let top = postil["top"] == null ? toY - 18 * Store.zoomRatio : postil["top"] * Store.zoomRatio;
+ let width = postil["width"] == null ? _this.defaultWidth * Store.zoomRatio : postil["width"] * Store.zoomRatio;
+ let height = postil["height"] == null ? _this.defaultHeight * Store.zoomRatio : postil["height"] * Store.zoomRatio;
let value = postil["value"] == null ? "" : postil["value"];
if(top < 0){
@@ -723,10 +729,10 @@ const luckysheetPostil = {
let toX = col;
let toY = row_pre;
- let left = postil["left"] == null ? toX + 18 : postil["left"];
- let top = postil["top"] == null ? toY - 18 : postil["top"];
- let width = postil["width"] == null ? _this.defaultWidth : postil["width"];
- let height = postil["height"] == null ? _this.defaultHeight : postil["height"];
+ let left = postil["left"] == null ? toX + 18 * Store.zoomRatio : postil["left"] * Store.zoomRatio;
+ let top = postil["top"] == null ? toY - 18 * Store.zoomRatio : postil["top"] * Store.zoomRatio;
+ let width = postil["width"] == null ? _this.defaultWidth * Store.zoomRatio : postil["width"] * Store.zoomRatio;
+ let height = postil["height"] == null ? _this.defaultHeight * Store.zoomRatio : postil["height"] * Store.zoomRatio;
let value = postil["value"] == null ? "" : postil["value"];
if(top < 0){
diff --git a/src/controllers/zoom.js b/src/controllers/zoom.js
index 34d3569..711e395 100644
--- a/src/controllers/zoom.js
+++ b/src/controllers/zoom.js
@@ -5,6 +5,7 @@ import sheetmanage from './sheetmanage';
import {changeSheetContainerSize} from './resize';
import { jfrefreshgrid_rhcw } from '../global/refresh';
import server from './server';
+import luckysheetPostil from './postil';
import imageCtrl from './imageCtrl';
@@ -31,6 +32,9 @@ export function zoomChange(ratio){
let currentSheet = sheetmanage.getSheetByIndex();
+ //批注
+ luckysheetPostil.buildAllPs(currentSheet.data);
+
//图片
imageCtrl.images = currentSheet.images;
imageCtrl.allImagesShow();
diff --git a/src/global/draw.js b/src/global/draw.js
index 2ad7da4..e62fb50 100644
--- a/src/global/draw.js
+++ b/src/global/draw.js
@@ -1112,7 +1112,7 @@ let nullCellRender = function(r, c, start_r, start_c, end_r, end_c,luckysheetTab
//若单元格有批注
if(Store.flowdata[r][c] != null && Store.flowdata[r][c].ps != null){
- let ps_w = 5*Store.zoomRatio, ps_h = 5*Store.zoomRatio;
+ let ps_w = 8*Store.zoomRatio, ps_h = 8*Store.zoomRatio;
luckysheetTableContent.beginPath();
luckysheetTableContent.moveTo( (end_c + offsetLeft - 1- ps_w), (start_r + offsetTop));
luckysheetTableContent.lineTo( (end_c + offsetLeft - 1), (start_r + offsetTop));
@@ -1338,17 +1338,17 @@ let cellRender = function(r, c, start_r, start_c, end_r, end_c, value, luckyshee
let verticalAlignPos_text = (pos_y + verticalCellHeight - space_height) ; //文本垂直方向基准线
luckysheetTableContent.textBaseline = "bottom";
- let verticalAlignPos_checkbox = verticalAlignPos_text - 13;
+ let verticalAlignPos_checkbox = verticalAlignPos_text - 13 * Store.zoomRatio;
if(verticalAlign == "0"){ //居中对齐
verticalAlignPos_text = (pos_y + verticalCellHeight / 2);
luckysheetTableContent.textBaseline = "middle";
- verticalAlignPos_checkbox = verticalAlignPos_text - 6;
+ verticalAlignPos_checkbox = verticalAlignPos_text - 6 * Store.zoomRatio;
}
else if(verticalAlign == "1"){ //上对齐
verticalAlignPos_text = (pos_y + space_height);
luckysheetTableContent.textBaseline = "top";
- verticalAlignPos_checkbox = verticalAlignPos_text + 1;
+ verticalAlignPos_checkbox = verticalAlignPos_text + 1 * Store.zoomRatio;
}
horizonAlignPos = horizonAlignPos / Store.zoomRatio;