dom-examples icon indicating copy to clipboard operation
dom-examples copied to clipboard

Fix pick coordinates relative to the image

Open nsauzede opened this issue 4 years ago • 0 comments

Current code uses absolute mouse coordinates instead of relative to the canvas, which in turn makes the actual hovered/selected color inaccurate (there's an x/y offset that reads pixel further towards top/left direction) This diff hasn't been tested in the exact tutorial context, but seems to fix the bug and work fine in a simpler, similar unit test (which had the exact same issue)

nsauzede avatar Jan 03 '22 03:01 nsauzede