Features

Download

Online

Gallery

Blog

  Index  | Recent Threads  | List Attachments  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 7
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 3212 times and has 6 replies Next Thread
Gildaniel
Member
Member's Avatar

Russia
Joined: Aug 11, 2017
Post Count: 84
Status: Offline
Reply to this Post  Reply with Quote 
Need help - viewHomeInNewTabFullBrowerWindow script

Dear Colleagues, experienced in JavaScript sweethome lovers!

Could you please help me to adopt viewHomeInOverlay script, to see sh3d model online in full browser window, like model shows in Online Viewer? http://www.sweethome3d.com/viewHome.jsp?id=887

Exploring models online in framed overlay there are some incommodities to face:

With smartphones:
- too small window of 3d viewer, especially in vertical mode;
- if you ocasionally tap somewhere outside overlay window boundaries - it closes viewer.

With desktops:
- using mouse wheel without Shift button in some browsers scrolls the html page instead of zooming 3d (in aerial mode) or moving through (in virtual visit mode)
- also occasion tapping outside closes overlay.


Here http://www.sweethome3d.com/support/forum/viewthread_thread,6708_offset,70#45816 Puybaret advised me to make some code changes; but after I import script and done it all navigation (aerial/virtual, levels) gone from the page, and my programming experience is not so good to correct it and compile new script :(

Can somebody help, to correct the code of viewHomeInOverlay and compile script, opening sh3d on a new tab to full browser window with navigation elements?
[Feb 26, 2020, 11:05:33 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 7165
Status: Offline
Reply to this Post  Reply with Quote 
Re: Need help - viewHomeInNewTabFullBrowerWindow script

The Online viewer doesn't use viewHomeInOverlay but viewHome. If you want to inspire yourself from that viewer, just look at its source code!
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Feb 27, 2020, 3:10:37 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Gildaniel
Member
Member's Avatar

Russia
Joined: Aug 11, 2017
Post Count: 84
Status: Offline
Reply to this Post  Reply with Quote 
Re: Need help - viewHomeInNewTabFullBrowerWindow script

Unfortunately, reading viewhome.js did not make the question more clear for me.

May be SweetHome3DJSViewer.html even better suits for "full screening"; but all my attempts to tie canvas size to innerHeight and innerHeight, 100%, 100vh/100vw made it even smaller :( https://woodmouse.ru/test/view/test.html

There is a way of adaptive full screen canvas alinement - https://stackoverflow.com/questions/4288253/h...-width-height-of-viewport

Is it possible to use this method in SweetHome3DJSViewer.html?

Yours, Daniel
[Feb 27, 2020, 7:53:38 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Gildaniel
Member
Member's Avatar

Russia
Joined: Aug 11, 2017
Post Count: 84
Status: Offline
Reply to this Post  Reply with Quote 
Re: Need help - viewHomeInNewTabFullBrowerWindow script

Next my step - I found function "window.onresize = function(ev)" in html of Online Viewer, and insert this script to SweetHome3DJSViewer.html

It almost works and reacting to browser resizing, but with mistakes.. ufffffff
https://woodmouse.ru/test/view/test2.html
[Feb 27, 2020, 8:08:10 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Gildaniel
Member
Member's Avatar

Russia
Joined: Aug 11, 2017
Post Count: 84
Status: Offline
Reply to this Post  Reply with Quote 
Re: Need help - viewHomeInNewTabFullBrowerWindow script

It was hard, but solved

https://woodmouse.ru/3dplan/iek/5i.html
[Mar 13, 2020, 8:00:53 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Gildaniel
Member
Member's Avatar

Russia
Joined: Aug 11, 2017
Post Count: 84
Status: Offline
Reply to this Post  Reply with Quote 
Re: Need help - viewHomeInNewTabFullBrowerWindow script

Calling to the new browser window with button from https://woodmouse.ru/3dplan/iek/5.html
[Mar 13, 2020, 9:28:54 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 7165
Status: Offline
Reply to this Post  Reply with Quote 
Re: Need help - viewHomeInNewTabFullBrowerWindow script

Congratulations! smile
Handling window space is really not the easiest thing in JavaScript...
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Mar 13, 2020, 5:48:00 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

    Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads
   
© Copyright 2006-2020 eTeks - All rights reserved