half block grid view and export fix

This commit is contained in:
Hugh Bord 2022-05-22 15:58:06 +08:00
parent 939df96341
commit fb7d299567
2 changed files with 8 additions and 2 deletions

View File

@ -437,7 +437,7 @@ export const exportMirc = (blocks = null) => {
};
if (curBlock.fg === undefined && curBlock.bg === undefined) {
output.push(curBlock.char !== ' ' ? ' ' : '\u0003');
output.push('\u0003');
} else {
if (curBlock.bg === undefined && curBlock.fg !==

View File

@ -498,6 +498,12 @@ export default {
async currentAsciiLayers(val, old) {
await this.delayRedrawCanvas(true);
},
halfBlockEditing(val, old) {
if (val !== old && this.gridView) {
this.clearToolCanvas();
this.drawGrid();
}
}
},
methods: {
startExport(type) {
@ -876,7 +882,7 @@ export default {
this.toolCtx.stroke();
this.toolCtx.beginPath();
for (var y = 1; y <= h; y += blockHeight) {
for (var y = 1; y <= h; y += this.halfBlockEditing ? (blockHeight / 2) : blockHeight) {
this.toolCtx.moveTo(0, y);
this.toolCtx.lineTo(w, y);
}