Cannot move the debug window.

Just starting out? Need help? Post your questions and find answers here.
Stefan
Posts: 248
Joined: Mon Feb 05, 2018 9:44 pm

Re: Cannot move the debug window.

Post by Stefan »

okay, but how do I incorporate this into my Spiderbasic code?
Stefan
Posts: 248
Joined: Mon Feb 05, 2018 9:44 pm

Re: Cannot move the debug window.

Post 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?
Quin
Posts: 118
Joined: Wed Nov 08, 2023 4:38 pm

Re: Cannot move the debug window.

Post 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.
Stefan
Posts: 248
Joined: Mon Feb 05, 2018 9:44 pm

Re: Cannot move the debug window.

Post by Stefan »

Unfortunately, this code causes the program to crash
Stefan
Posts: 248
Joined: Mon Feb 05, 2018 9:44 pm

Re: Cannot move the debug window.

Post 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?
Post Reply