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:
Matthew Taylor 2017-12-15 10:37:31 -05:00
parent 73dce6ca50
commit 7df3d69fc6
3 changed files with 5 additions and 1 deletions

View file

@ -48,6 +48,7 @@
height: 1.5rem;
border: 1px solid #ddd;
border-radius: 4px;
box-sizing: content-box;
}
.active-swatch {

View file

@ -353,7 +353,7 @@ const PaintEditorComponent = props => {
<div
className={classNames(
styles.canvasContainer,
[styles.withEyeDropper]: props.isEyeDropping
{[styles.withEyeDropper]: props.isEyeDropping}
)}
>
<PaperCanvas

View file

@ -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