Browse Source

fix(bugs): fix issue #27 #29

master
javahuang 5 years ago
parent
commit
5d572676d4
  1. 4
      src/controllers/formulaBar.js
  2. 2
      src/controllers/handler.js
  3. 2
      src/controllers/keyboard.js

4
src/controllers/formulaBar.js

@ -33,6 +33,10 @@ export function formulaBarInitial(){
let row_index = last["row_focus"], col_index = last["column_focus"];
let $input = $("#luckysheet-rich-text-editor"),value = $input.text();
if(value) {
formula.updatecell(row_index, col_index);
}
luckysheetupdateCell(row_index, col_index, Store.flowdata, null, true);
formula.rangeResizeTo = $("#luckysheet-functionbox-cell");
}

2
src/controllers/handler.js

@ -4580,7 +4580,7 @@ export default function luckysheetHandler() {
}
}
let fs = Math.floor(parseInt($td.css("font-size")) * 72 / dpi_y) + 1;
let fs = Math.floor(parseInt($td.css("font-size")) * 72 / 96) + 1;
cell.fs = fs;
let fc = $td.css("color");

2
src/controllers/keyboard.js

@ -834,7 +834,7 @@ export function keyboardInitial(){
else if (kcode == keycode.RIGHT && parseInt($inputbox.css("top")) > 0) {
formulaMoveEvent("right", ctrlKey, shiftKey);
}
else if (!((kcode >= 112 && kcode <= 123) || kcode <= 46 || kcode == 144 || kcode == 108 || event.ctrlKey || event.altKey || (event.shiftKey && (kcode == 37 || kcode == 38 || kcode == 39 || kcode == 40))) || kcode == 8 || kcode == 32 || kcode == 46 || (event.ctrlKey && kcode == 86)) {
else if (!((kcode >= 112 && kcode <= 123) || kcode <= 46 || kcode == 144 || kcode == 108 || event.ctrlKey || event.altKey || (event.shiftKey && (kcode == 37 || kcode == 38 || kcode == 39 || kcode == 40 || kcode == keycode.WIN || kcode == keycode.WIN_R || kcode == keycode.MENU))) || kcode == 8 || kcode == 32 || kcode == 46 || (event.ctrlKey && kcode == 86)) {
formula.functionInputHanddler($("#luckysheet-functionbox-cell"), $("#luckysheet-rich-text-editor"), kcode);
setCenterInputPosition(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1], Store.flowdata);
}

Loading…
Cancel
Save