raphamorim / origami.js

Powerful and Lightweight Library to create using HTML5 Canvas

Home Page:https://raphamorim.io/origamijs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Detect if Mouse is over an object inside canvas

raphamorim opened this issue · comments

origami('#canvas')
.rect(300,30,40,{
   background: 'blue',
   hover: function(item, canvas){
         // item: current shape
         // canvas: current origami context
         item.background = 'red';
    }
})
.draw();

Is this feature available somewhere that I can pull from?