You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I started using kineticjs 4.2.0 with KineticGWT a while ago. Until now I had to change the following:
The parameters in createAnimation in Kinetic.java have changed in 4.2.0, it now uses 2 parameters instead of an object:
/**
* Create an Animation.
* @param context The context layer (animation takes place on this layer)
* @param fct A custom drawing function
* @return An object that can be used to control the animation
*/
public static native Animation createAnimation(Layer context, Drawable fct) /*-{
return new $wnd.Kinetic.Animation(
function(frame) {
fct.@net.edzard.kinetic.Drawable::draw(Lnet/edzard/kinetic/Frame;)(@net.edzard.kinetic.Frame::new(DDD)(frame.lastTime, frame.time, frame.timeDiff));
},
context
);
}-*/;
getBoxHeight and getBoxWidth in Text class do not exist anymore in kineticjs, the getWidth and getHeight now return the box size.
The text was updated successfully, but these errors were encountered:
Thanks for those first two bits. Upgrading to a new KineticJS version though is probably better done in a single rush by going through the changelog (in our case from 4.0.2 to 4.2.0, or rather 4.3.0) and adapting everything at once.
In KineticGWT all Nodes are draggable by default. In the newest KineticJS (4.3.1) this leads to undesired behaviour: instead of moving the Container (e.g. Group), KineticJS moves the Node inside the Group. I suggest switching the default to false as it is more in line with the KineticJS and it is easier to turn draggability "on" on the container than to turn it "off" on all the constituents of the container.
I started using kineticjs 4.2.0 with KineticGWT a while ago. Until now I had to change the following:
The parameters in createAnimation in Kinetic.java have changed in 4.2.0, it now uses 2 parameters instead of an object:
getBoxHeight and getBoxWidth in Text class do not exist anymore in kineticjs, the getWidth and getHeight now return the box size.
The text was updated successfully, but these errors were encountered: