Browse Source

Merge pull request #638 from DahuaChan/master

修复toolbar的两个bug
master
Dushusir 4 years ago
committed by GitHub
parent
commit
f38dc6f8de
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      src/controllers/resize.js
  2. 1
      src/controllers/toolbar.js

13
src/controllers/resize.js

@ -117,7 +117,8 @@ export default function luckysheetsizeauto(isRefreshCanvas=true) {
const $t = $(this)[0];
const $container = $("#luckysheet-wa-editor")[0];
// $container.appendChild(document.createTextNode(" "));
$container.appendChild(document.createTextNode(" "));
$container.appendChild($t);
});
@ -392,7 +393,7 @@ export function menuToolBarWidth() {
if (JSON.stringify(showtoolbarConfig) !== '{}') {
if(showtoolbarConfig.hasOwnProperty('undoRedo')){
config.undo = config.redo = showtoolbarConfig.undoRedo;
// delete showtoolbarConfig.undoRedo;
}
Object.assign(config, showtoolbarConfig);
@ -401,10 +402,8 @@ export function menuToolBarWidth() {
for (let i = 0; i<defaultToolbar.length; i++) {
current = defaultToolbar[i];
next = defaultToolbar[i + 1];
if(config[current] === false) {
continue;
}
if (current !== '|') {
if (current !== '|' && config[current]) {
obj[current] = {
ele: toolbarIdMap[current],
index: index++
@ -605,4 +604,4 @@ function customStatisticBarConfig() {
$("#" + Store.container).find(".luckysheet-stat-area").show();
Store.statisticBarHeight = 23;
}
}
}

1
src/controllers/toolbar.js

@ -876,7 +876,6 @@ export function createToolbarHtml() {
if (JSON.stringify(showtoolbarConfig) !== '{}') {
if(showtoolbarConfig.hasOwnProperty('undoRedo')){
config.undo = config.redo = showtoolbarConfig.undoRedo;
// delete showtoolbarConfig.undoRedo;
}
Object.assign(config, showtoolbarConfig);
}

Loading…
Cancel
Save