-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use cheerpjCreateDisplay #45
Comments
just done it, let me know if it works good for you
interesting finding, it really can speed the things up as the things are now going to be done closer to the java/cheerpj level, where the actual code is running
I didn't know that, somehow I assume the png generation is always there by default. let's see the impact of it! |
It works fine! Many thanks
Yes, I'm very curious to see the result. It has some impact on the Java code, so we have to wait several days (weeks?)... |
@sakirtemel I've integrated this "cheerpjCreateDisplay" into main with this link. The good news is that it's really faster :-D There are still some issue. You have to wait and to enter several keys to see something. Things to known:
In the online version, I really did it badly, in the sense that I am using a @sakirtemel Could you change it and rather than calling convertCanvas(), we should:
On big issue is that I think it's impossible to change the drawing area size within Java (so to resize the canvas). I made a lot of tests and it really does not think possible in Java. Would it be possible for you that, in Javascript, you figure out what is exactly this object (I call it Canvas, but not sure it is a real Canvas) and that you search for method to resize it ? On my side, I'm going to create an Thanks! |
Ok, this almost work... The image is not displayed, but if you see source in new tab (with Chrome), you'll see the SVG source. |
Yeah, I figured that svgs are not like images at all recently :D I'm going to do a quick research. By the way, congrats for making it work 🎉 it works significantly fast for a complex diagram that is in the examples(~1 second). I'm going to take a look at the code overall for the things you mentioned ( #45 (comment) ) I set myself as a review in that PR just not to skip it |
@arnaudroques sorry that it took some time, I'll take a look at the things this week |
I can see that here's an implementation: https://plantuml.github.io/plantuml-core/raw.html . it's so fast! I'm going to slowly move that #4 svg rendering here |
The actual behavior not very efficient:
Fortunately, it could be possible to use cheerpjCreateDisplay.
I've created a branch where this cheerpjCreateDisplay function is called.
My understanding is that it create a Canvas in the HTML page.
Right now, a simple blue rectangle is drawn in Java, but in the future, we could draw the real diagram.
(See the demo!)
@sakirtemel could you remove the actual drawing (we won't need it any more) and rearrange the Canvas position (which is below content) to that it is displayed on the left? (By working on the branch panel2, it's not ready to be merged at all!)
Thanks!
The text was updated successfully, but these errors were encountered: