Page 2 of 2

Re: Cannot move the debug window.

Posted: Mon Oct 21, 2024 5:43 am
by Stefan
okay, but how do I incorporate this into my Spiderbasic code?

Re: Cannot move the debug window.

Posted: Sun Nov 10, 2024 6:49 am
by Stefan

Code: Select all

!document.body.style.zoom = 1 / window.devicePixelRatio * 100 + "%"
!v_width=document.body.clientWidth;
!v_height=document.body.clientHeight;
I'm still looking for an alternative for this code, as Fred says it's not a good idea to use it.
I need a java script or a Spiderbasic code for this.
Does anyone have an idea?

Re: Cannot move the debug window.

Posted: Sun Nov 10, 2024 9:40 am
by Quin
Stefan wrote: Sun Nov 10, 2024 6:49 am

Code: Select all

!document.body.style.zoom = 1 / window.devicePixelRatio * 100 + "%"
!v_width=document.body.clientWidth;
!v_height=document.body.clientHeight;
I'm still looking for an alternative for this code, as Fred says it's not a good idea to use it.
I need a java script or a Spiderbasic code for this.
Does anyone have an idea?
You could do this with inline JS:

Code: Select all

! const metaViewport = document.createElement("meta");
! metaViewport.name = "viewport";
! metaViewport.content = "width=device-width, initial-scale=1.0";
! document.head.appendChild(metaViewport);
That was written out quickly in a notepad window and not tested, but something very close to that at least should work.

Re: Cannot move the debug window.

Posted: Sun Nov 10, 2024 2:53 pm
by Stefan
Unfortunately, this code causes the program to crash

Re: Cannot move the debug window.

Posted: Fri Jun 20, 2025 2:29 pm
by Stefan

Code: Select all

.example2 {
  zoom: 1.5; /* Adjust the value to zoom in or out */
}
I found this CSS code.
Maybe I can zoom in and out of the screen with CSS.
But how do I integrate it into SpiderBasic?