Browse Source
Merge pull request #903 from nekobc1998923/fix-cursor-full
fix(server.js): 修复协同编辑器i情况下,如果光标在左上的边接处显示不全的问题
master
mengshukeji
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
18 additions and
9 deletions
-
src/controllers/server.js
|
|
@ -989,17 +989,26 @@ const server = { |
|
|
|
|
|
|
|
col = margeset.column[1]; |
|
|
|
col_pre = margeset.column[0]; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 超出16个字符就显示...
|
|
|
|
if(getByteLen(name) > 16){ |
|
|
|
name = getByteLen(name,16) + "..."; |
|
|
|
} |
|
|
|
// *处理光标在靠左或者靠上顶着的时候,光标显示不全的问题
|
|
|
|
if(col_pre <= 0){ |
|
|
|
col_pre += 1 |
|
|
|
} |
|
|
|
|
|
|
|
// 如果正在编辑,就显示“正在输入”
|
|
|
|
if(value === 'enterEdit'){ |
|
|
|
name += " " + locale().edit.typing; |
|
|
|
} |
|
|
|
if(row_pre <= 0){ |
|
|
|
row_pre +=1 |
|
|
|
} |
|
|
|
|
|
|
|
// 超出16个字符就显示...
|
|
|
|
if(getByteLen(name) > 16){ |
|
|
|
name = getByteLen(name,16) + "..."; |
|
|
|
} |
|
|
|
|
|
|
|
// 如果正在编辑,就显示“正在输入”
|
|
|
|
if(value === 'enterEdit'){ |
|
|
|
name += " " + locale().edit.typing; |
|
|
|
} |
|
|
|
|
|
|
|
if($("#luckysheet-multipleRange-show-" + id).length > 0){ |
|
|
|
$("#luckysheet-multipleRange-show-" + id).css({ "position": "absolute", "left": col_pre - 1, "width": col - col_pre - 1, "top": row_pre - 1, "height": row - row_pre - 1 }); |
|
|
|