samccone / moji-brush

https://www.mojibrush.co
67 stars 7 forks source link

Brush currently only works with touch #2

Closed addyosmani closed 8 years ago

addyosmani commented 8 years ago

Testing against Canary/Dev/Stable, I can only get the emoji brush working if I'm emulating touch in DevTools. We might want to get it working all over thurr place. onmousedown/onmouseup? :cake:

onTouch currently only checks against touchstart and touchmove.

  function onTouch(e) {
    for(let i = 0; i < e.touches.length; ++i) {
      let touch = e.touches[i];

      ctx.fillText(String.fromCodePoint(app.activeBrush),
                   touch.clientX * window.devicePixelRatio,
                   touch.clientY * window.devicePixelRatio);
    }

    e.preventDefault();
  }
samccone commented 8 years ago

WAI

but yeah we can make it work for mouse stuff as well :+1:

sebmck commented 8 years ago

yes this has left me very dissatisfied with this emoji brush tool. please fix this or i will be changing to another project, or i will write my own and publish it to npm.

sebmck commented 8 years ago

due to your delay in resolving this critical issue i have forked as lobrush. have a nice day mr cone.

samccone commented 8 years ago

Fixed