mirror of
https://github.com/scratchfoundation/scratch-paint.git
synced 2025-01-10 22:47:03 -05:00
small styling updates
make the swatches aligned in gui, and make sure the cursor shows when not eye dropping. Also moves eye dropper initialization into the helper. Thanks @paulkaplan!
This commit is contained in:
parent
73dce6ca50
commit
7df3d69fc6
3 changed files with 5 additions and 1 deletions
|
@ -48,6 +48,7 @@
|
|||
height: 1.5rem;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 4px;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
.active-swatch {
|
||||
|
|
|
@ -353,7 +353,7 @@ const PaintEditorComponent = props => {
|
|||
<div
|
||||
className={classNames(
|
||||
styles.canvasContainer,
|
||||
[styles.withEyeDropper]: props.isEyeDropping
|
||||
{[styles.withEyeDropper]: props.isEyeDropping}
|
||||
)}
|
||||
>
|
||||
<PaperCanvas
|
||||
|
|
|
@ -18,6 +18,9 @@ class EyeDropperTool extends paper.Tool {
|
|||
this.height = height * this.zoom * this.pixelRatio;
|
||||
this.rect = canvas.getBoundingClientRect();
|
||||
this.colorString = '';
|
||||
this.pickX = -1;
|
||||
this.pickY = -1;
|
||||
this.hideLoupe = true;
|
||||
}
|
||||
handleMouseMove (event) {
|
||||
// Set the pickX/Y for the color picker loop to pick up
|
||||
|
|
Loading…
Reference in a new issue