Fixed ellipse bug, fixed brush size bug

This commit is contained in:
Nicola 2022-01-30 22:53:59 +01:00
parent edf5d77ffd
commit 79a3c07b82
3 changed files with 13 additions and 8 deletions

View File

@ -110,19 +110,24 @@ li#editor-info {
} }
input { input {
margin-left:10px; margin-left:10px;
background-color:$basehovertext; background-color:darken($basecolor, 6%);
box-shadow:none; box-shadow:none;
border:none; border:none;
vertical-align: middle; vertical-align: middle;
border-radius:5px; border-radius:5px;
padding: 5px;
color:$basetext;
} }
input[type=text] { input[type=text] {
width:20px; width:25px;
height:15px; height:15px;
} }
input[type=checkbox] { input[type=checkbox] {
width:15px; padding:1px;
height:15px; width:20px;
height:20px;
background-color:darken($basecolor, 5%) !important;
} }
} }
} }

View File

@ -138,7 +138,6 @@
#tool-tutorial { #tool-tutorial {
display:inline-block; display:inline-block;
position:absolute; position:absolute;
z-index:1109;
margin-left:48px; margin-left:48px;
margin-top:48px; margin-top:48px;
background-color: $basehover; background-color: $basehover;
@ -146,6 +145,7 @@
font-size:14px; font-size:14px;
width:22%; width:22%;
border-radius:0 5px 5px 5px; border-radius:0 5px 5px 5px;
z-index:1000;
img { img {
width:100%; width:100%;

View File

@ -161,7 +161,7 @@ class EllipseTool extends ResizableTool {
for (const coord in toFill) { for (const coord in toFill) {
let arrayCoord = JSON.parse("[" + coord + "]"); let arrayCoord = JSON.parse("[" + coord + "]");
if (arrayCoord[0]-xc > 0 || arrayCoord[1]-yc < 0) { if (arrayCoord[0]-xc < 0 || arrayCoord[1]-yc < 0) {
continue; continue;
} }
@ -180,9 +180,9 @@ class EllipseTool extends ResizableTool {
!removed[[arrayCoord[0], arrayCoord[1] + 1]] && !removed[arrayCoord[0] + 1, arrayCoord[1]])) || !removed[[arrayCoord[0], arrayCoord[1] + 1]] && !removed[arrayCoord[0] + 1, arrayCoord[1]])) ||
removed[arrayCoord]) { removed[arrayCoord]) {
context.fillRect(arrayCoord[0], arrayCoord[1], this.currSize, this.currSize); context.fillRect(arrayCoord[0], arrayCoord[1], this.currSize, this.currSize);
context.fillRect(xc + Math.abs(xc - arrayCoord[0]), arrayCoord[1], this.currSize, this.currSize); context.fillRect(xc - Math.abs(xc - arrayCoord[0]), arrayCoord[1], this.currSize, this.currSize);
context.fillRect(arrayCoord[0], yc - Math.abs(yc - arrayCoord[1]), this.currSize, this.currSize); context.fillRect(arrayCoord[0], yc - Math.abs(yc - arrayCoord[1]), this.currSize, this.currSize);
context.fillRect(xc + Math.abs(xc - arrayCoord[0]), yc - Math.abs(yc - arrayCoord[1]), this.currSize, this.currSize); context.fillRect(xc - Math.abs(xc - arrayCoord[0]), yc - Math.abs(yc - arrayCoord[1]), this.currSize, this.currSize);
} }
removed[arrayCoord] = true; removed[arrayCoord] = true;