fix for eyedropper rendering
Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
This commit is contained in:
parent
f559ab8f64
commit
4118d78a7f
1 changed files with 2 additions and 2 deletions
|
@ -172,7 +172,7 @@ const colorBrushTool = () =>
|
||||||
uiCtx.arc(
|
uiCtx.arc(
|
||||||
vcp.x,
|
vcp.x,
|
||||||
vcp.y,
|
vcp.y,
|
||||||
state.eyedropper ? 50 : (state.brushSize / 2) * viewport.zoom,
|
(state.eyedropper ? 50 : state.brushSize / 2) * viewport.zoom,
|
||||||
0,
|
0,
|
||||||
2 * Math.PI,
|
2 * Math.PI,
|
||||||
true
|
true
|
||||||
|
@ -246,7 +246,7 @@ const colorBrushTool = () =>
|
||||||
state.leftclickcb = (evn) => {
|
state.leftclickcb = (evn) => {
|
||||||
if (evn.target === imageCollection.inputElement && state.eyedropper) {
|
if (evn.target === imageCollection.inputElement && state.eyedropper) {
|
||||||
const bb = getBoundingBox(evn.x, evn.y, 1, 1, false);
|
const bb = getBoundingBox(evn.x, evn.y, 1, 1, false);
|
||||||
const visibleCanvas = getVisible(bb);
|
const visibleCanvas = uil.getVisible(bb);
|
||||||
const dat = visibleCanvas
|
const dat = visibleCanvas
|
||||||
.getContext("2d")
|
.getContext("2d")
|
||||||
.getImageData(0, 0, 1, 1).data;
|
.getImageData(0, 0, 1, 1).data;
|
||||||
|
|
Loading…
Reference in a new issue