简体   繁体   中英

Working with old version of KineticJS

I had developed a complex enough canvas web application using kinetic.js about a year ago. I used kinetic.js 3.10.4. version And I'm surprised that my application is not work anymore on the latest Browser like Google Chrome and Mozilla Firefox. For example, there was an error while creating Text shapes. Here is the stack trace error from Google Chrome debugger:

Uncaught TypeError: Type error
Kinetic.Shape.Kinetic.Node.extend.fill
config.drawFunc
Kinetic.Shape.Kinetic.Node.extend._draw
Kinetic.Container.Kinetic.Node.extend._drawChildren
Kinetic.Layer.Kinetic.Container.extend._draw
Kinetic.Layer.Kinetic.Container.extend.draw
loadMenu
_background.onload

I've tried using 4.6.0 version but there are some deprecated functions and features on my legacy code. I just wondering that I could using my current 3.10.4 version library (with several effortless fix) rather than update to the 4.6.0 version . Is it still possible to do that? Thanks in advance :)

Yes, Transitions are eliminated and have been replaced by Tweens effective KineticV4.5.

Tweens are coded similarly to the old Transitions.

So any recoding of Transitions into Tweens should be straight-forward.

Changes in ChromeV26 broke kinetic fills--so KineticV4.3 and older fills won't work.

Possible options:

  • Try Kinetic version 4.4 where fills are fixed and transitions still exist.
  • Recode your Transtions into Tweens and use the current version.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM