-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Popup Resize #178
Comments
@nyzzik We should probably also redesign the openStageAsPopup() API. |
On 2024.2.2-SNAPSHOT I am running into the same error app.getWebAPI().openStageAsPopup(as);
WebAPI.getWebAPI(as.getScene()).executeJSAsync("window.resizeTo(700,300);"); This is the code I am trying to execute, |
Can you add the initial output of your server - with the JPro build-timestamp? |
[INFO ] c.jpro.activity - Starting the server
[INFO ] c.j.i.s.JProInitializer$ - *** Starting JPro: https://www.jpro.one/ ***
[INFO ] c.j.i.s.JProInitializer$ - OS: Windows 11
[INFO ] c.j.i.s.JProInitializer$ - JPro: 2024.2.2-SNAPSHOT
[INFO ] c.j.i.s.JProInitializer$ - JPro buildtime: Thu, 27 Jun 2024 11:57:03 -0400
[INFO ] c.j.i.s.JProInitializer$ - Java version: 21.0.2
[INFO ] c.j.i.s.JProInitializer$ - JVM: 21.0.2 Oracle Corporation
[INFO ] c.j.i.s.JProInitializer$ - JavaFX jar: file:/C:/Users/{my user}/.m2/repository/org/openjfx/javafx-graphics/22.0.2-jpro/javafx-graphics-22.0.2-jpro-win.jar
[INFO ] c.j.i.s.JProInitializer$ - Configuring logging from url: 'jar:file:/C:/Users/{my user}/.m2/repository/com/sandec/jpro/jpro-server_2.12/2024.2.2-SNAPSHOT/jpro-server_2.12-2024.2.2-SNAPSHOT.jar!/logback-jpro-default.xml'
[INFO ] c.j.i.s.JProInitializer$ - JavaFX version: 22.0.2-jpro+0
G1 Young Generation
G1 Concurrent GC
G1 Old Generation
[INFO ] c.j.i.s.JProInitializer$ - finished init!
[INFO ] c.j.i.s.JProInitializer$ - [JPro] -> Server started: {start_time: 1719936727164, os_name: Windows 11, jpro_version: 2024.2.2-SNAPSHOT}
[INFO ] a.e.s.Slf4jLogger - Slf4jLogger started
[INFO ] play.api.Play - Application started (Prod) (no global state)
[INFO ] p.c.s.AkkaHttpServer - Enabling HTTP/2 on Akka HTTP server...
[INFO ] p.c.s.AkkaHttpServer - Listening for HTTP on /0.0.0.0:8080
[INFO ] c.jpro - application requested: MyApp params: Map(instanceID -> List(573772191))
[INFO ] c.jpro - Creating Application: MyApp
[INFO ] c.jpro - remoteAddress 127.0.0.1
[INFO ] c.jpro - host localhost:8080
[INFO ] c.jpro - uri /app/ws/MyApp?instanceID=573772191
[INFO] [start] - 2024-07-02T12:12:11.300826 - JPro server is alive!
[INFO ] c.j.i.s.ViewInfo$ - [JPro] -> View created: {app_name: myapp, host_name: localhost:8080, instance_id: 782208353, browser: Unknown, browser_url: http://localhost:8080/, client_ip: 127.0.0.1} It looks like i am running the correct version |
After deleting the version that was in my .m2 repository and redownloading it, it looks like it is working now. It doesnt seem to be working in firefox but that seems to be a firefox thing not a jpro thing. Are there any other ways of resizing the popup or would this be it? Thanks for the help. |
I'm thinking about redesigning how the popup API works. This is basically what the showStageAsPopup API is doing:
So you can copy it and adapt it to your needs. However, I recommend against using "browser" popups; instead, show either the stage with the owner property or somehow show it inside the application. |
I am trying to resize a stage popup after calling
WebAPI.openStageAsPopup()
. I found a way to do it using javascript usingwindow.resizeTo()
however this is only working when i set it trigger on button press. If i call it after I popup the window i get this error. I have tried doing it in the JavaFX initialize method as well as setting up a window on load event listener using javascript and receive the same error. Is a way to resize the popup window?The text was updated successfully, but these errors were encountered: