antipole2/JavaScript_pi

Dialogue created by onDialogue not screen resolution aware

Closed this issue · 19 comments

The dialogue created probably has wrong sizing on Windows hi-res screens and likely on Linux too.
This does not affect MacOS, which deals with screen resolution within the OS.

Attached is a test script (zipped).
It should look like this (as on MacOS).

@rgleason - please can you please try this and post a screenshot?

Tony, this can be very useful! Gets me thinking.
I unzipped and used notepad++ to view it and then simply copied it into the plugin and Run.

JS-Test-1

JS-Test-2

First attempt to fix this in alpha build bb9e490

Fixes in next build f8515c4.
Addition to test script to test ticklists:
After existing line
{type:"spinner", label:"Draught (decimeters)", range:[10,30], value:20},
add extra line
{type:"tickList", label:"Down wind sails", value:["Spinnaker","Cruising 'chute", "Code 0"]},

What branch is this Fixes in next build f8515c4.
?

What branch is this Fixes in next build f8515c4.

v2.1

Ok to make sure I am testing the right plugin tarball please advise which cloudsmith repos, is it alpha?
https://cloudsmith.io/~opencpn/repos/javascript-alpha/packages/
That is what I have been using, the most recent version.

Yes, alpha as per your link.

New build in alpha repository fdc0127 attempts better fixes for JS dialogue. Rick - please test.

That one works!
Screenshot (1386)
Screenshot (1387)

I think this can be closed now

Rick... A big improvement - almost there. The field heights were wrong. New build 921a081 in the alpha repository.
Please add an extra field for tick lists
After existing line
{type:"spinner", label:"Draught (decimeters)", range:[10,30], value:20},
add extra line
{type:"tickList", label:"Down wind sails", value:["Spinnaker","Cruising 'chute", "Code 0"]},
It should look like this.
Dialogue
Please check the dialogue again.

Also, please attend to Tools Consoles tab
Thanks a lot.

I tried adding the second line and the alert never showed.
I tried changing the added second line to
{type:"tickList", label:"Down wind sail", value:["Spinnaker","Cruising 'chute", "Code 0"]},
and the alert did not work either. So I just removed it and saved the file and ran what I entered. Don't understand why you ask me to add the second line as it is already there.

Screenshot (1389)

Screenshot (1390)

Here's my script with the extra choice field repeating the ticklist.
dialogue_demo.js.zip
And here is what it should look like

withchoice

I guess you wanted spinner above, but here you are using choice?
Anyway I still seem to have the same error when I try to register, no yellow box filled appears. It is not really working for some reason. Loaded your file and these are the shots. OUtput at the bottom shows correctly.

Screenshot (1405)

Screenshot (1406)

That all looks good.
In the revised script I sent you there is no alert.

Close this now?

Yes please, I can't as I did not open it.
PS Should have noticed that..

Resolved!