Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Eric Duminil
RegionChooser
Commits
e9082330
Commit
e9082330
authored
7 years ago
by
Eric Duminil
Browse files
Options
Download
Email Patches
Plain Diff
RegionChooser: Wait until window is ready.
parent
38f904fd
master
develop
migrate_to_Java11
0.2.2
0.1.0
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/eu/simstadt/regionchooser/RegionChooserBrowser.java
+1
-4
src/eu/simstadt/regionchooser/RegionChooserBrowser.java
src/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js
+10
-2
...stadt/regionchooser/website/script/simstadt_openlayers.js
with
11 additions
and
6 deletions
+11
-6
src/eu/simstadt/regionchooser/RegionChooserBrowser.java
+
1
-
4
View file @
e9082330
...
...
@@ -194,10 +194,7 @@ public RegionChooserBrowser() {
if
(
newState
==
State
.
SUCCEEDED
)
{
JSObject
win
=
(
JSObject
)
webEngine
.
executeScript
(
"window"
);
win
.
setMember
(
"fxapp"
,
fxapp
);
webEngine
.
executeScript
(
"console.log = function(message)\n"
+
"{\n"
+
" fxapp.log(message);\n"
+
"};"
);
win
.
call
(
"ready"
);
try
{
fxapp
.
importNovaFactoryBoundingBoxes
();
}
catch
(
Exception
ex
)
{
...
...
This diff is collapsed.
Click to expand it.
src/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js
+
10
-
2
View file @
e9082330
...
...
@@ -159,10 +159,9 @@ var draw = new ol.interaction.Draw({
map
.
addInteraction
(
draw
);
var
sketch
;
var
fromJavaFX
;
var
fromJavaFX
=
false
;
//Can be overwritten later if launched from JavaFX
draw
.
on
(
'
drawstart
'
,
function
(
evt
)
{
fromJavaFX
=
(
typeof
fxapp
!==
'
undefined
'
);
sketch
=
evt
.
feature
;
reset_btn
.
disabled
=
false
;
updateGMLPolygons
();
...
...
@@ -333,4 +332,13 @@ function focusOnMap() {
// $('#map').scrollIntoView();
}
// Executed by JavaFX when whole page is loaded.
window
.
ready
=
function
()
{
fromJavaFX
=
true
;
console
.
log
=
function
(
message
){
fxapp
.
log
(
message
);
}
console
.
log
(
"
READY!
"
);
}
focusOnMap
();
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets