Search code examples
kineticjsmouseoveropacity

KineticJS and mouseover and opacity


I created a JSFiddle located here:

jsfiddle.net/r17k48bp/

I can't seem to figure out why the mouseover event doesn't change the opacity but clicking on the group does??

Thanks,

Jim


Solution

  • You have to redraw layer after shapes updating.

    mgroup.on('mouseover', function() {
     this.opacity(0.5);
     shapesLayer.draw();
    });
    

    http://jsfiddle.net/r17k48bp/2/