I modified the code. I omitted the planView.paintComponent line and put back the part planView.gridColor = oldGridColor from the original code. Even so, the downloaded image is perfectly fine and I don't see any changes in the floor plan after reloading the page.
The final code:
function ...
Search found 21 matches
- Sat Aug 13, 2022 11:44 am
- Forum: Developers
- Topic: Canvas size in Sweet Home 3D JS
- Replies: 10
- Views: 8490
- Sat Aug 13, 2022 9:49 am
- Forum: Developers
- Topic: Canvas size in Sweet Home 3D JS
- Replies: 10
- Views: 8490
Re: Sweet Home 3D JS Online
The problem was that a new canvas was created. This is how it works:
function AlaprajzMentes() {
let downloadLink = document.createElement('a');
downloadLink.setAttribute('download', 'alaprajz.jpg');
let canvas = document.getElementById('home-plan.canvas');
var planView = application ...
function AlaprajzMentes() {
let downloadLink = document.createElement('a');
downloadLink.setAttribute('download', 'alaprajz.jpg');
let canvas = document.getElementById('home-plan.canvas');
var planView = application ...
- Fri Aug 12, 2022 5:25 pm
- Forum: Developers
- Topic: Canvas size in Sweet Home 3D JS
- Replies: 10
- Views: 8490
Re: Sweet Home 3D JS Online
It's almost good. There is only a problem with the background color. It should be all white. (The invisible part is not white)
function AlaprajzMentes() {
let downloadLink = document.createElement('a');
downloadLink.setAttribute('download', 'alaprajz.jpg');
var planView = application ...
function AlaprajzMentes() {
let downloadLink = document.createElement('a');
downloadLink.setAttribute('download', 'alaprajz.jpg');
var planView = application ...
- Fri Aug 12, 2022 12:56 pm
- Forum: Developers
- Topic: Canvas size in Sweet Home 3D JS
- Replies: 10
- Views: 8490
Re: Sweet Home 3D JS Online
That's right, but you also posted in the blog that this is how you can save it as an image.
No idea why it doesn't save the whole canvas?
It looks like this:


No idea why it doesn't save the whole canvas?
It looks like this:


- Fri Aug 12, 2022 11:47 am
- Forum: Developers
- Topic: Canvas size in Sweet Home 3D JS
- Replies: 10
- Views: 8490
Re: Sweet Home 3D JS Online
The problem is not with printing, but with saving as an image:
function DownloadAsImage() {
let downloadLink = document.createElement('a');
downloadLink.setAttribute('download', 'plan.jpg');
let canvas = document.getElementById('home-plan.canvas');
var planView = application.homeControllers ...
function DownloadAsImage() {
let downloadLink = document.createElement('a');
downloadLink.setAttribute('download', 'plan.jpg');
let canvas = document.getElementById('home-plan.canvas');
var planView = application.homeControllers ...
- Thu Aug 11, 2022 8:41 pm
- Forum: Developers
- Topic: Canvas size in Sweet Home 3D JS
- Replies: 10
- Views: 8490
Re: Sweet Home 3D JS Online
I would like to use the floor plan designer in such a way that it can be used on desktop, tablet and mobile.
For example, the user goes to an apartment and draws the floor plan on a mobile phone, then completes it on the desktop computer and prints it out.
I found several problems. The biggest ...
For example, the user goes to an apartment and draws the floor plan on a mobile phone, then completes it on the desktop computer and prints it out.
I found several problems. The biggest ...
- Tue Jun 14, 2022 6:39 pm
- Forum: Developers
- Topic: Autosave 3djs
- Replies: 10
- Views: 8062
Re: Autosave 3djs
I resolved the problem.
Lack of write permission to folder caused the error.
I have only one problem. I can not able to delete the sh3d files from the apache homes folder.
I have got exception:
System.UnauthorizedAccessException: Access to the path 'xxxx.sh3d' is denied.
I don't think the apache ...
Lack of write permission to folder caused the error.
I have only one problem. I can not able to delete the sh3d files from the apache homes folder.
I have got exception:
System.UnauthorizedAccessException: Access to the path 'xxxx.sh3d' is denied.
I don't think the apache ...
- Wed Jun 08, 2022 11:28 am
- Forum: Developers
- Topic: Autosave 3djs
- Replies: 10
- Views: 8062
Autosave 3djs
Hello Emmanuel, Renaud,
I tried to set it to automatically save changes to the file when editing an empty sh3d file, but it returns an error 500.
I have added the following to the currently working planner:
var application = new SweetHome3DJSApplication(
{
readHomeURL: urlBase + "readHome.jsp ...
I tried to set it to automatically save changes to the file when editing an empty sh3d file, but it returns an error 500.
I have added the following to the currently working planner:
var application = new SweetHome3DJSApplication(
{
readHomeURL: urlBase + "readHome.jsp ...
- Sat Jun 04, 2022 7:17 am
- Forum: Developers
- Topic: Saving by button click and reload online 3djs
- Replies: 1
- Views: 4719
Saving by button click and reload online 3djs
I would like to save and reload the sh3d file by saving the file with the click of a button.
The latest version of 3djs online is running on my own server (https://megveszlak.hu/alaprajz-tervezo)
When starts the program, I want to offer a list from which to choose whether to load an empty sh3d or ...
The latest version of 3djs online is running on my own server (https://megveszlak.hu/alaprajz-tervezo)
When starts the program, I want to offer a list from which to choose whether to load an empty sh3d or ...
- Wed Mar 30, 2022 7:57 pm
- Forum: Installation
- Topic: Installing Sweet Home 3D JS Online on my server
- Replies: 17
- Views: 8576