I'm having a similar problem as in #853, but that's closed so I'm reopening it with a bit more details. If I'm doing something wrong please forgive me and tell me how I can fix up my issue filing.
I have a Kinetic.Stage containing a single Kinetic.Layer, which in turn contains a Kinetic.Circle object.
The gist of the bug is that when I try to change the location of the circle by changing the x and y positions, then calling draw(), the position is changed correctly, but the old circle is not removed from the canvas. I've tried manually clearing the canvas (using clear()) before calling the draw operation, and I've tried everything from using setAbsolutePosition to setting it directly using x() and y() -- no luck.
So before this I was running everything off a local server at localhost:8080. The moment I switched to 127.0.0.1:8080, all the problems disappeared and everything works exactly as expected.
I've done my best to verify that I'm not running anything fancy that could be messing with the canvas depending on whether I'm passing in a direct IP address or if I'm using a string address. If it helps, I'm running Chrome 36 on OS X.
Can you provide jsfiddle? If you are calling draw on any node (except Layer and Stage) it will not remove "old" node from canvas. Just draw new on top of canvas.
I'm having a similar problem as in #853, but that's closed so I'm reopening it with a bit more details. If I'm doing something wrong please forgive me and tell me how I can fix up my issue filing.
I have a
Kinetic.Stage
containing a singleKinetic.Layer
, which in turn contains aKinetic.Circle
object.The gist of the bug is that when I try to change the location of the circle by changing the x and y positions, then calling
draw()
, the position is changed correctly, but the old circle is not removed from the canvas. I've tried manually clearing the canvas (usingclear()
) before calling the draw operation, and I've tried everything from usingsetAbsolutePosition
to setting it directly usingx()
andy()
-- no luck.So before this I was running everything off a local server at
localhost:8080
. The moment I switched to127.0.0.1:8080
, all the problems disappeared and everything works exactly as expected.I've done my best to verify that I'm not running anything fancy that could be messing with the canvas depending on whether I'm passing in a direct IP address or if I'm using a string address. If it helps, I'm running Chrome 36 on OS X.
Would appreciate if anyone had any ideas!