Print at Dec 17, 2025, 8:53:24 AM
Posts: 12   Pages: 2   [ 1 2 | Next Page ]
View all posts in this thread on one page
Posted by jogibear9988 at Oct 26, 2023, 7:40:40 PM
Webcomponent support in SweetHome3D JS
I'd like to use SweetHome3D in a webcomponent. But the viewHome function requires a element id. Would it be possible, if I use a HTMLElement as a parameter instead of a string, you use the compoent you get hand over, instead of search yourself for the component.
So it could be use inside of a webcomponent?

Posted by jogibear9988 at Oct 26, 2023, 11:16:14 PM
Re: Webcomponent support in SweetHome3D JS
One of the changes needed would be this: https://github.com/node-projects/sweethome3d-...72b7d3ad5525bdad72e0af8d3

Posted by jogibear9988 at Oct 26, 2023, 11:35:20 PM
Re: Webcomponent support in SweetHome3D JS
and this one https://github.com/node-projects/sweethome3d-...c05b6c30613b5c101e70a4e40

Posted by jogibear9988 at Oct 26, 2023, 11:36:49 PM
Re: Webcomponent support in SweetHome3D JS
Can I create Pull reuests? Never used sourceforge in the last years?

Posted by jogibear9988 at Oct 27, 2023, 12:49:25 AM
Re: Webcomponent support in SweetHome3D JS
I now also remove the "define" calls from some additional libs. Cause I use "monaco" editor in my frontend, wich is using require/define and this does not work with the libs. In these the code is only for nodejs support, but I think it is not needed there.
Best would be to switch to es6...

see commit: https://github.com/node-projects/sweethome3d-...cbbfc5f6507a62f1a5cc97d57

Posted by jogibear9988 at Oct 27, 2023, 12:51:29 AM
Re: Webcomponent support in SweetHome3D JS


was the wrong commit, this is the correct one: https://github.com/node-projects/sweethome3d-...63ae5f6c4f938b90985781e1d

Posted by jogibear9988 at Oct 27, 2023, 1:05:11 AM
Re: Webcomponent support in SweetHome3D JS
And another fix for activeElement inside shadowRoot: https://github.com/node-projects/sweethome3d-...e619a7388972e1c350031f992

Posted by jogibear9988 at Oct 27, 2023, 1:19:38 AM
Re: Webcomponent support in SweetHome3D JS
here is a sample how it could be used: https://node-projects.github.io/web-component...projects-sweet-home-3d%3E

Posted by jogibear9988 at Oct 28, 2023, 11:55:04 AM
Re: Webcomponent support in SweetHome3D JS
@Puybaret
what do you think about the changes? i would do them myself, if there is a way to create pull requests.

Posted by Kunda at Nov 1, 2023, 2:04:29 PM
Re: Webcomponent support in SweetHome3D JS
You can make patches and then submit them on the forum or directly to sourceforge

Posts: 12   Pages: 2   [ 1 2 | Next Page ]