|
@ -1,4 +1,5 @@ |
|
|
import Store from '../store'; |
|
|
import Store from '../store'; |
|
|
|
|
|
import { computeRowlenByContent } from './getRowlen'; |
|
|
import luckysheetConfigsetting from '../controllers/luckysheetConfigsetting'; |
|
|
import luckysheetConfigsetting from '../controllers/luckysheetConfigsetting'; |
|
|
|
|
|
|
|
|
export default function rhchInit(rowheight, colwidth) { |
|
|
export default function rhchInit(rowheight, colwidth) { |
|
@ -19,19 +20,23 @@ export default function rhchInit(rowheight, colwidth) { |
|
|
Store.visibledatarow.push(Store.rh_height); |
|
|
Store.visibledatarow.push(Store.rh_height); |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 自动行高计算
|
|
|
|
|
|
if (rowlen === 'auto') { |
|
|
|
|
|
rowlen = computeRowlenByContent(Store.flowdata, r); |
|
|
|
|
|
} |
|
|
Store.rh_height += Math.round((rowlen + 1) * Store.zoomRatio); |
|
|
Store.rh_height += Math.round((rowlen + 1) * Store.zoomRatio); |
|
|
|
|
|
|
|
|
Store.visibledatarow.push(Store.rh_height); //行的临时长度分布
|
|
|
Store.visibledatarow.push(Store.rh_height); //行的临时长度分布
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 如果增加行和回到顶部按钮隐藏,则减少底部空白区域,但是预留足够空间给单元格下拉按钮
|
|
|
// 如果增加行和回到顶部按钮隐藏,则减少底部空白区域,但是预留足够空间给单元格下拉按钮
|
|
|
if(!luckysheetConfigsetting.enableAddRow && !luckysheetConfigsetting.enableAddBackTop){ |
|
|
if (!luckysheetConfigsetting.enableAddRow && !luckysheetConfigsetting.enableAddBackTop) { |
|
|
Store.rh_height += 29; |
|
|
Store.rh_height += 29; |
|
|
}else{ |
|
|
} else { |
|
|
Store.rh_height += 80; //最底部增加空白
|
|
|
Store.rh_height += 80; //最底部增加空白
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//列宽
|
|
|
//列宽
|
|
@ -79,7 +84,7 @@ export default function rhchInit(rowheight, colwidth) { |
|
|
// maxColumnlen = firstcolumnlen + 1;
|
|
|
// maxColumnlen = firstcolumnlen + 1;
|
|
|
// }
|
|
|
// }
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Store.ch_width += 120;
|
|
|
// Store.ch_width += 120;
|
|
|
Store.ch_width += maxColumnlen; |
|
|
Store.ch_width += maxColumnlen; |
|
|
} |
|
|
} |
|
@ -93,4 +98,4 @@ export function zoomSetting(){ |
|
|
$("#luckysheet-rows-h").width((Store.rowHeaderWidth-1.5)); |
|
|
$("#luckysheet-rows-h").width((Store.rowHeaderWidth-1.5)); |
|
|
$("#luckysheet-cols-h-c").height((Store.columnHeaderHeight-1.5)); |
|
|
$("#luckysheet-cols-h-c").height((Store.columnHeaderHeight-1.5)); |
|
|
$("#luckysheet-left-top").css({width:Store.rowHeaderWidth-1.5, height:Store.columnHeaderHeight-1.5}); |
|
|
$("#luckysheet-left-top").css({width:Store.rowHeaderWidth-1.5, height:Store.columnHeaderHeight-1.5}); |
|
|
} |
|
|
} |
|
|