transparent block parse fix

This commit is contained in:
Hugh Bord 2022-04-17 12:58:47 +10:00
parent 571f8b89af
commit 32baf0c98d
2 changed files with 17 additions and 9 deletions

View File

@ -283,8 +283,8 @@ export const parseMircAscii = async (contents, filename) => {
// \x03 without color code is a soft block reset
if (matches[1] === undefined && matches[2] === undefined) {
block.fg = 1;
block.bg = 0;
block.fg = null;
block.bg = null;
continue;
}

View File

@ -9,7 +9,8 @@ import {
createNewAscii,
exportMirc,
mergeLayers,
cyrb53
cyrb53,
toolbarIcons
} from '../../src/ascii'
import 'jest-canvas-mock';
import hotkeysImport from 'hotkeys-js';
@ -40,9 +41,7 @@ describe('Editor.vue', () => {
width: 5,
height: 5,
}
})
})
})
@ -115,11 +114,20 @@ describe('Editor.vue', () => {
// store,
// localVue,
// hotkeys,
// toolbarIcons
// })
// // Black canvas fill
// let mircExportHash = cyrb53(exportMirc(mergeLayers()).output.join(""));
// expect(mircExportHash).toEqual(182731023251036);
// wrapper.vm.x = 0;
// wrapper.vm.y = 0;
// // console.log(exportMirc(mergeLayers()).output.join(""));
// store.commit('changeTool', 'brush');
// const canvasTools = wrapper.find('#canvastools')
// canvasTools.trigger('click');
// // console.log(exportMirc(mergeLayers()).output.join(""));
// })