artf / grapick

Easy configurable gradient picker, with no dependencies

Home Page:https://artf.github.io/grapick/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clicking on the very bottom of picker adds a transparent handler

opened this issue · comments

Able to replicate in Chrome and Firefox, while on Edge I'm not able to select the lowset pixel, as if Chrome or Firefox has extra 1 pixel at the bottom

image

Simple solution is to add extra constraint in initEvents method

      const x = e.offsetX - pEl.clientLeft;
      const y = e.offsetY - pEl.clientTop;
      percentage = x / elDim.w * 100;
      if (percentage > max || percentage < min) {
        return;
      }
      if(y > elDim.h || y < 0){
        return;
      }