some bug fixes

This commit is contained in:
Hugh Bord 2021-09-04 15:16:27 +10:00
parent 5498b22c98
commit 954259703d
4 changed files with 38 additions and 44 deletions

View File

@ -34,7 +34,7 @@ A most latest production build to use is available at https://asciibird.jewbird.
* Saves layers, brushes data also to same file
* Can import from clipboard, load from irc.watch/ascii, load from file
* Can export mirc ascii to clipboard, file or HTTP POST
* 99 Colour support, flip colours
* 99 Colour support, swap colours with button click
* Mirror X and Y
* Grid mode with alt + g
* Undo and redo with ctrl + z and ctrl + y, undos are set to a limit of 50 at the moment.
@ -47,7 +47,7 @@ A most latest production build to use is available at https://asciibird.jewbird.
* Brush mode
* Block picker (grab fg, bg and char of a block)
* Eraser - remove blocks
* Fill Eraser - Fill remove blocks by bg
* Fill Eraser - Fill remove blocks by bg, fg or char
* Brush Library and History
* Make circle, square and cross brushes by sizes
* Brush history, can save or re-use old brushes
@ -67,11 +67,7 @@ ASCIIBIRD is mostly usable. There are some bugs however to note at the moment. R
* Circle brush (works okay for odd width and height numbers)
* Importer could be re-written with regex
* Having more than a few layers depending on ascii size will slow things down, until the `fillNullBlocks` is refactored.
* Select cannot select entire ASCII, is off by one at the end
* We could add a special clause for the select tool when mouse leaves canvas to select all blocks
* z indexing for toolbars and stuff is ANNOYING
* Messing with deleting layers, if you somehow have a layer that isn't selected, it'll be buggy. This is hard to do.
* Fill tool use fg or char as bounds
## Focusing on Now / Roadmap
* Modals to add
@ -99,7 +95,9 @@ ASCIIBIRD is mostly usable. There are some bugs however to note at the moment. R
* The code that hides blocks off screen wont work if you scroll down, however it will work if you drag the canvas upward
* Exporter will default transparent bg to black by default, which wont for some asciis
* Review escape and enter keys on dialogs and modals
* Select cannot select entire ASCII, is off by one at the end
* Fill tool use fg or char as bounds
* z indexing for toolbars and stuff is ANNOYING
# Keyboard Shortcuts
## ASCII Editing

View File

@ -101,7 +101,7 @@
<template v-if="asciibirdMeta.length">
<div
class="bg-gray-500 z-50 relative"
class="bg-gray-500 z-40 relative"
ref="tabbar"
:style="toolbarString"
>
@ -112,28 +112,20 @@
<span
v-for="(value, key) in asciibirdMeta"
:key="key"
class="mr-2 z-50"
class="mr-2 z-40"
>
<t-button
class="p-1 z-50"
class="p-1 z-40"
:class="buttonStyle(key)"
@click="changeTab(key, value)"
>
{{ value.title }}
<t-button class="z-50" @click="closeTab(key)"> X </t-button>
<t-button class="z-40" @click="closeTab(key)"> X </t-button>
</t-button>
</span>
</div>
<Toolbar class="z-10" :y-offset="scrollOffset" />
<DebugPanel
:canvas-x="canvasX"
:canvas-y="canvasY"
v-if="debugPanelState.visible"
class="z-10"
:y-offset="scrollOffset"
/>
<Editor
@coordsupdate="updateCoords"
@ -142,31 +134,40 @@
:update-canvas="updateCanvas"
@selecting="updateSelecting"
:y-offset="scrollOffset"
class="z-10"
/>
<CharPicker
v-if="toolbarState.isChoosingChar"
class="z-10"
:y-offset="scrollOffset"
/>
<ColourPicker
v-if="toolbarState.isChoosingFg || toolbarState.isChoosingBg"
class="z-10"
<Toolbar :y-offset="scrollOffset" />
<DebugPanel
:canvas-x="canvasX"
:canvas-y="canvasY"
v-if="debugPanelState.visible"
:y-offset="scrollOffset"
/>
<BrushLibrary
v-if="brushLibraryState.visible"
class="z-10"
:y-offset="scrollOffset"
/>
<BrushPreview
class="z-10"
@inputtingbrush="inputtingbrush"
:y-offset="scrollOffset"
/>
<LayersLibrary class="z-10" :y-offset="scrollOffset" />
<LayersLibrary :y-offset="scrollOffset" />
<CharPicker
v-if="toolbarState.isChoosingChar"
class="z-50"
:y-offset="scrollOffset"
/>
<ColourPicker
v-if="toolbarState.isChoosingFg || toolbarState.isChoosingBg"
class="z-50"
:y-offset="scrollOffset"
/>
</template>
<template v-else>
<div
@ -321,10 +322,10 @@ export default {
},
},
watch: {
scrollOffset(val) {
this.$refs.tabbar.style.top = val;
this.toolbarString = `top: ${val}px`;
},
// scrollOffset(val) {
// this.$refs.tabbar.style.top = val;
// this.toolbarString = `top: ${val}px`;
// },
},
methods: {
inputtingbrush(val) {

View File

@ -491,10 +491,9 @@ export const exportMirc = () => {
fg: -1
};
for (let y = 0; y <= currentAsciiLayersWidthHeight.height - 1; y++) {
for (let y = 0; y <= currentAsciiLayersWidthHeight.height; y++) {
for (let x = 0; x <= currentAsciiLayersWidthHeight.width; x++) {
for (let x = 0; x <= currentAsciiLayersWidthHeight.width - 1; x++) {
curBlock = {
...blocks[y][x]
};
@ -515,10 +514,6 @@ export const exportMirc = () => {
pushString = `\u0003\u0003${zeroPad(curBlock.fg,2,)}`;
}
// if (curBlock.bg !== null && curBlock.fg === null) {
// pushString = `\u0003,${zeroPad(curBlock.bg, 2)}`;
// }
if (curBlock.bg !== null && curBlock.fg !== null) {
pushString = `\u0003${zeroPad(curBlock.fg,2,)},${zeroPad(curBlock.bg, 2)}`;
}

View File

@ -606,8 +606,8 @@ export default {
case "select":
if (this.selecting.canSelect) {
this.selecting.endX = this.canvasX;
this.selecting.endY = this.canvasY;
this.selecting.endX = (this.canvasX + blockWidth);
this.selecting.endY = (this.canvasY + blockHeight);
this.redrawSelect();
}