mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
Fixed ellipse bug, fixed brush size bug
This commit is contained in:
parent
edf5d77ffd
commit
79a3c07b82
@ -110,19 +110,24 @@ li#editor-info {
|
||||
}
|
||||
input {
|
||||
margin-left:10px;
|
||||
background-color:$basehovertext;
|
||||
background-color:darken($basecolor, 6%);
|
||||
box-shadow:none;
|
||||
border:none;
|
||||
vertical-align: middle;
|
||||
border-radius:5px;
|
||||
padding: 5px;
|
||||
color:$basetext;
|
||||
}
|
||||
input[type=text] {
|
||||
width:20px;
|
||||
width:25px;
|
||||
height:15px;
|
||||
}
|
||||
|
||||
input[type=checkbox] {
|
||||
width:15px;
|
||||
height:15px;
|
||||
padding:1px;
|
||||
width:20px;
|
||||
height:20px;
|
||||
background-color:darken($basecolor, 5%) !important;
|
||||
}
|
||||
}
|
||||
}
|
@ -138,7 +138,6 @@
|
||||
#tool-tutorial {
|
||||
display:inline-block;
|
||||
position:absolute;
|
||||
z-index:1109;
|
||||
margin-left:48px;
|
||||
margin-top:48px;
|
||||
background-color: $basehover;
|
||||
@ -146,6 +145,7 @@
|
||||
font-size:14px;
|
||||
width:22%;
|
||||
border-radius:0 5px 5px 5px;
|
||||
z-index:1000;
|
||||
|
||||
img {
|
||||
width:100%;
|
||||
|
@ -161,7 +161,7 @@ class EllipseTool extends ResizableTool {
|
||||
for (const coord in toFill) {
|
||||
let arrayCoord = JSON.parse("[" + coord + "]");
|
||||
|
||||
if (arrayCoord[0]-xc > 0 || arrayCoord[1]-yc < 0) {
|
||||
if (arrayCoord[0]-xc < 0 || arrayCoord[1]-yc < 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -180,9 +180,9 @@ class EllipseTool extends ResizableTool {
|
||||
!removed[[arrayCoord[0], arrayCoord[1] + 1]] && !removed[arrayCoord[0] + 1, arrayCoord[1]])) ||
|
||||
removed[arrayCoord]) {
|
||||
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(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;
|
||||
|
Loading…
Reference in New Issue
Block a user