-
-
Notifications
You must be signed in to change notification settings - Fork 375
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
Putting Sabaki in a div box and resizing it #394
Comments
Have you tried assigning your container |
I just tried it out, but still the same issue. I see. OK thanks for the help! |
Sabaki uses Preact, a view framework. Currently, Preact will inject all the elements into |
Ok, I changed it to the div container but still no different result it seems. |
Hi, Changing Then it's just css. I fear there will be quite some css tweaks to have it work properly but that's doable. I ll dig into that later. Context: I am working with czabo to integrate sabaki into OSR website. |
@climu Sounds great! I would greatly appreciate it if you would share your findings with us here. Maybe these CSS tweaks can be incorporated into Sabaki itself. |
Sure thing. At some point, I ll fork so you can follow what we are doing and we can discuss PR. |
Allright, I pushed a first draft in this commit. Issues so far:
Do you have any idea how I could have mess with the menu behaviour? I will try to go toward this global behaviour: Sabaki doesn't load on pageload but we need to call a method such as |
The input box and drawers are visible because Sabaki does not hide them explicitly, it just moves them out of the viewport, in this case As for the menu, Sabaki creates a |
Thanks. There is still quite some issues with elements being wrongly positioned and sized. I ll keep digging |
@yishn : Are the elements size calculated by some js function? Would such calculation be relative to the viewport size? If no it's only css. If yes, we might need to change this resize js function. Thanks for your help! |
@climu I've fixed the bugs in the most recent version of Sabaki Web. Can you try and see if the menu is working on your end now? I think size calculations are always relative to the viewport size, but I'm not entirely sure. |
I've slept on this and I think in general, the easiest and correct way to include Sabaki into a web page is via an
|
Makes sense. I guess we will go this way. Thanks for your work. |
For the record we never added sabaki using I think the proper way would be to use your work to create a sgf viewer that would load inside a html element of a website as wgo does. It could be usefull for website who wants to show a sgf viewer easily. One could create that using your libraries (shudan, go-board, sgf) with inspiration from sabaki. I fear it's a bit over my head so I will pass on that. Just sharing thoughts in case anyone comes here. |
Here is an attempt. |
Hi,
I want to integrate Sabaki as part of a website. It works fine, but no matter how I resize the div box I am putting the interface in, the website always shows the Sabaki interface in the whole window. I would like to be able to put the interface in a div box, resize it and finally place it somewhere on a particular website.
At the moment it seems the interface fills up the whole and ignores div boxes.
I already played around with css files, but I wasn't able to fix that.
Thanks,
Any help is greatly appreciated
The text was updated successfully, but these errors were encountered: