2

I'm trying to understand how to pause and resume interaction in paper.js.

I have the metaball example on a page with an input element on top, and because paper.js steals focus for driving the metaball generation onMouseMove... bad things happen. Like not able to select what you typed.

I understood I could use item.locked = true;, but I don't know what to apply it to because nothing works.

What is the parent Item for paper.js and can I lock it so that everything stops responding to the mouse?

I also couldn't reattach the mousemove event from the Tool, which is why I came to look into item.locked. What's the correct way to remove and reattach mouse events?

  • 1
    Could you add an example? Because I cannot see your problem when I try to recreate it: http://bit.ly/1jjKBWQ I can easily select what I typed. To stop the metaballs from moving you could add global boolean that controls everything in mousemove and set it to false when an input is active. – Christoph Feb 07 '14 at 08:56
  • 1
    You're right! Only happens in Chrome, selecting with the mouse. Also, if you drag and reach beyond the canvas selection works. Should I file a bug report for this? –  Feb 09 '14 at 02:33
  • I am also using Chrome (Version 32.0.1700.107 on a mac). The question is if the bug should be filed for chrome or paper.js. – Christoph Feb 09 '14 at 11:09

0 Answers0