ericdrowell / KineticJS

KineticJS is an HTML5 Canvas JavaScript framework that extends the 2d context by enabling canvas interactivity for desktop and mobile applications.
http://www.kineticjs.com
3.98k stars 752 forks source link

issue with my eraser and the drag function #969

Open yechoua opened 10 years ago

yechoua commented 10 years ago

so previously i've asked for some help to make an eraser, i've done it but her some issue I whant to resolve: her the jsfiddle: http://jsfiddle.net/junkees/tf7m3/1/ so her you can se i've 3 layer, the bottom did nothing it's juste an image the middLayer have a rect (that can be permutted with something other) and a shape the topLayer have a rect and a shape too So her the issue: when I click somewhere in the red layer the eraser work perfectly, but when i whant to drag the red layer and trying to erase after, the eraser work but you can notice he have some friend that I never whanted to get. Like you can see I'm trying to make a "multi level" eraser, to be able to erase on the top(blue) and middlayer(red). I've seen this post but didn't help me (maybe it's not the solution?)