First time here? Check out the FAQ!
asked 2012-05-25 08:41:29 +0100Jales
I'm aware of ZKoss Canvas, or Canvas4Z project, and using it for current project.
But, this library lacks of certain interactivity, which we need.
Does ZKoss developer team has considered using this library in ZKoss?
I don't know if Canvas4Z is an actual component of ZKoss or is an external project.
Is there anyone already porting KineticJS to ZKoss? If not, we might want to try to port it to ZKoss.
We have found this documentation to develop component in ZKoss :
Can we use this documentation to port KineticJS to ZKoss?
What "other things" we need to consider/know before porting this library to ZKoss?
The architecture of ZK component is complex, and the document simplify many details.
Client Side Programming is another approach, maybe easier (maybe)
BTW, would you like to talk about which parts of ZKoss Canvas or Canvas4Z didn't meet your requirements?
One of our requirement is to be able to interact easily with the graphic component of a strategy map (example : http://www.balancedscorecards.com/wp-content/uploads/2010/11/Strategy_map.jpg)
The interactivity needed is such as :
a. Easily positioning the strategic objective (the elipse component). This means we must be able to easily select and then drag them across the canvas. We happen to stumbled upon this tutorial ( http://books.zkoss.org/wiki/Small_Talks/2012/February/How_To_Use_Canvas4Z_Part2 ) that shows how to select it and move the graphic component. But, this is not as good as we hoped. We want it to be just like this :
b. Easily connect two strategic objective (the elipse component) but the line must be flexible enough to be shaped as curve (look at those connecting lines in the strategic map example above). We have been able to connect it using and arrow line, but the line is rigid, and it cannot be shaped as curve easily. We want it to look like this :
Those are just two I could think of right now. If we succeeded in porting the KineticJS library to ZKoss, we will have more requirements since it will open more interactivity possibilities. That's why we want to port this library to ZKoss.
answered 2012-08-29 02:51:41 +0100SoundwaveTape
I love KineticJS as well and needed to use it in a ZK environment (with ServerPush). KineticJS is continuously updated. Porting the library would be a very hard thing, but maintaining the port would be just as costly. I thought a great approach is to keep it a JS library and write my own JS wrapper library on top of it (customizing grouping and other functions). The server would do as much as it can and send JSON updates to the KineticJS wrapper.
Declare in ZUL:
<button label="100%" onClick="com.yourCompany.ui.kinetic.KineticFunctions.setScale(1.0)"/> <button label="50%" onClick="com.yourCompany.ui.kinetic.KineticFunctions.setScale(0.5)"/>
For KineticJS, you need a div for a canvas:
<html> <body> <div id="kineticCanvas"></div> </body> </html>
In your KineticFunctions, just have methods like:
Asked: 2012-05-25 08:41:29 +0100
Seen: 732 times
Last updated: Feb 25 '14