davonium
davonium
This is a problem that's hard to try in a jsfiddle, pixel modifications on canvas does not work when using cross-origin image data...
http://www.html5canvastutorials.com/kineticjs/html5-canvas-kineticjs-image-tutorial/ this example works when changing to the newest library, so I don't think this is an issue.
The problem of the suggested code is that the _initImage must be renamed to _initScaledImage (or similar). In the example you will have a recursive loop since the image constructor...
Sounds like you should set the beforedraw of the shapes to use composition. And then restore in afterdraw.
I think I have a solution, but it includes som coding. Let me try it then I'll be back with the result ;)
Ok, sorry if keeping you waiting. Here's my suggestion: http://jsfiddle.net/davonium/RNLxb/7/ You can send any shape to the makeShapeComposite-function and it will be "updated" to use the compositeOperation you specify.
Just realised that this might mess up the buffer layer as well..
http://jsfiddle.net/cZLnM/3/ Since the setAttrs is refactored you need to write the points as xy-objects. Not sure if this is by design or not..
I have noticed this before. The reason is that the remove command removes the nodes colorkey from the stage, and that's why it can trigger events. You can manually insert...
Yes, the move to would do what you need. But i've seen some cases where a developer wants to have an undo-method for deleting object, and then there are no...