dntzhang / cax

Canvas 渲染引擎,支持 SVG,兼容了小程序、小游戏和 Web

Home Page:https://dntzhang.github.io/cax

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Polygon 实例 onTap 事件没有反应 , Rect 事件可以触发

racofix opened this issue · comments

    const polygon = new Polygon(points, {
      fillStyle: item.type.fill,
      strokeStyle: item.type.stroke
    });
    polygon.width = 100;
    polygon.height = 100;

    polygon.on('tap', () => {
      console.log('polygon tap');
    });

    polygon.on('onclick', () => {
      console.log('rect tap');
    });

Polygon 设置点击区域是 矩形 AABB 盒子么? 这样会有某些区域触发不了, 或者区域太大问题