Closed polokobe closed 8 years ago
@polokobe can you provide any examples?
You may take a look into this example: http://konvajs.github.io/docs/shapes/Custom.html
Also, are you calling layer.draw()
after setting attrs?
My code is :
shape.sceneFunc(function(context) {
// I do this to clear canvas
context.clearRect(0, 0, context.canvas.width, context.canvas.height);
context.beginPath();
........
}
when I use setAttrs(), I must do that to clear the canvas. And in the source code of konvajs,
drawScene: function(can, top, caching, skipBuffer) {
....
}
It seems that there is no code to do that. Thanks!
@polokobe you do not need to clear canvas. Konva
will do it for you.
I will close this issue. You can reopen it if you still have questions.
Hi, when I setAttrs() a shape, the new style of context does not display in the right way. should clear context in the begin of sceneFunc?