Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
leaflet-oilspill-control
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
stw
leaflet-oilspill-control
Commits
12ac0c6d
Commit
12ac0c6d
authored
May 24, 2017
by
Tomas Pettersson
🏸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
populate card
parent
9e6f924c
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
20 additions
and
45 deletions
+20
-45
demo/index.html
demo/index.html
+1
-1
src/leaflet-oilspill-cards.js
src/leaflet-oilspill-cards.js
+6
-20
src/leaflet-oilspill-cards.js.map
src/leaflet-oilspill-cards.js.map
+1
-1
src/leaflet-oilspill-cards.ts
src/leaflet-oilspill-cards.ts
+9
-20
src/leaflet-oilspill-control.js
src/leaflet-oilspill-control.js
+1
-1
src/leaflet-oilspill-control.js.map
src/leaflet-oilspill-control.js.map
+1
-1
src/leaflet-oilspill-control.ts
src/leaflet-oilspill-control.ts
+1
-1
No files found.
demo/index.html
View file @
12ac0c6d
...
...
@@ -131,7 +131,7 @@
"
lang
"
:
language
,
"
langdata
"
:
langData
});
containerControl
.
addComponent
(
"
Oil spill
"
,
oilspill
);
containerControl
.
addComponent
(
"
Continuous
Oil spill
"
,
oilspill
);
function
getURLParams
(
param
)
{
var
match
,
...
...
src/leaflet-oilspill-cards.js
View file @
12ac0c6d
...
...
@@ -260,23 +260,6 @@ var OSLocation = (function (_super) {
OSLocation
.
prototype
.
populateCard
=
function
(
geojson
)
{
var
self
=
this
;
self
.
control
.
addGeoJSON
(
geojson
);
var
type
=
geojson
.
features
[
0
].
geometry
.
type
.
toLowerCase
();
switch
(
type
)
{
case
"
point
"
:
self
.
pointButton
.
click
();
break
;
case
"
multipoint
"
:
self
.
multipointButton
.
click
();
break
;
case
"
linestring
"
:
self
.
lineButton
.
click
();
break
;
case
"
polygon
"
:
self
.
polygonButton
.
click
();
break
;
default
:
break
;
}
var
simulation
=
geojson
.
features
[
0
].
properties
.
simulation
;
self
.
depthInput
.
value
=
simulation
.
depth
;
var
observation
=
geojson
.
features
[
0
].
properties
.
observation
[
0
];
...
...
@@ -712,15 +695,18 @@ var OSType = (function (_super) {
};
OSType
.
prototype
.
populateCard
=
function
(
geojson
)
{
var
self
=
this
;
var
evt
=
document
.
createEvent
(
'
Event
'
);
evt
.
initEvent
(
"
change
"
,
true
,
true
);
var
simulation
=
geojson
.
features
[
0
].
properties
.
simulation
;
if
(
simulation
.
oilclass
==
'
Oil classes
'
)
{
document
.
getElementById
(
'
osOilClassTab
'
).
click
();
;
self
.
selectOilClass
.
value
=
geojson
.
features
[
0
].
properties
[
"
simulation
"
][
"
substance
"
]
;
self
.
selectOilClass
.
value
=
simulation
.
substance
;
self
.
selectOilClass
.
dispatchEvent
(
evt
)
;
}
if
(
simulation
.
oilclass
==
'
Oil, specific
'
)
{
document
.
getElementById
(
'
osOilSpecificTab
'
).
click
();
self
.
selectOilClass
.
value
=
geojson
.
features
[
0
].
properties
[
"
simulation
"
][
"
substance
"
];
self
.
selectOilSpecific
.
value
=
simulation
.
substance
;
self
.
selectOilSpecific
.
dispatchEvent
(
evt
);
}
};
OSType
.
prototype
.
populateData
=
function
(
geojson
)
{
...
...
src/leaflet-oilspill-cards.js.map
View file @
12ac0c6d
This diff is collapsed.
Click to expand it.
src/leaflet-oilspill-cards.ts
View file @
12ac0c6d
...
...
@@ -292,23 +292,6 @@ class OSLocation extends OilSpillCard {
public
populateCard
(
geojson
)
{
var
self
=
this
;
self
.
control
.
addGeoJSON
(
geojson
);
var
type
=
geojson
.
features
[
0
].
geometry
.
type
.
toLowerCase
();
switch
(
type
)
{
case
"
point
"
:
self
.
pointButton
.
click
();
break
;
case
"
multipoint
"
:
self
.
multipointButton
.
click
();
break
;
case
"
linestring
"
:
self
.
lineButton
.
click
();
break
;
case
"
polygon
"
:
self
.
polygonButton
.
click
();
break
;
default
:
break
;
}
var
simulation
=
geojson
.
features
[
0
].
properties
.
simulation
;
self
.
depthInput
.
value
=
simulation
.
depth
;
var
observation
=
geojson
.
features
[
0
].
properties
.
observation
[
0
];
...
...
@@ -783,16 +766,22 @@ class OSType extends OilSpillCard {
}
public
populateCard
(
geojson
)
{
var
self
=
this
;
var
evt
=
document
.
createEvent
(
'
Event
'
);
evt
.
initEvent
(
"
change
"
,
true
,
true
);
var
simulation
=
geojson
.
features
[
0
].
properties
.
simulation
;
if
(
simulation
.
oilclass
==
'
Oil classes
'
)
{
document
.
getElementById
(
'
osOilClassTab
'
).
click
();;
self
.
selectOilClass
.
value
=
geojson
.
features
[
0
].
properties
[
"
simulation
"
][
"
substance
"
];
document
.
getElementById
(
'
osOilClassTab
'
).
click
();
self
.
selectOilClass
.
value
=
simulation
.
substance
;
self
.
selectOilClass
.
dispatchEvent
(
evt
);
}
if
(
simulation
.
oilclass
==
'
Oil, specific
'
)
{
document
.
getElementById
(
'
osOilSpecificTab
'
).
click
();
self
.
selectOilClass
.
value
=
geojson
.
features
[
0
].
properties
[
"
simulation
"
][
"
substance
"
];
self
.
selectOilSpecific
.
value
=
simulation
.
substance
;
self
.
selectOilSpecific
.
dispatchEvent
(
evt
);
}
}
public
populateData
(
geojson
)
{
...
...
src/leaflet-oilspill-control.js
View file @
12ac0c6d
...
...
@@ -353,7 +353,7 @@ var L;
};
OilSpill
.
prototype
.
open
=
function
(
geojson
)
{
var
self
=
this
;
if
(
geojson
.
features
[
0
].
properties
.
type
==
'
o
bject
'
)
{
if
(
geojson
.
features
[
0
].
properties
.
type
==
'
o
il
'
&&
geojson
.
features
[
0
].
properties
.
subtype
==
'
spill
'
)
{
self
.
clear
();
for
(
var
i
in
self
.
cardMap
)
{
if
(
self
.
cardMap
.
hasOwnProperty
(
i
))
{
...
...
src/leaflet-oilspill-control.js.map
View file @
12ac0c6d
This diff is collapsed.
Click to expand it.
src/leaflet-oilspill-control.ts
View file @
12ac0c6d
...
...
@@ -368,7 +368,7 @@ module L.Control {
public
open
(
geojson
)
{
var
self
=
this
;
if
(
geojson
.
features
[
0
].
properties
.
type
==
'
o
bject
'
)
{
if
(
geojson
.
features
[
0
].
properties
.
type
==
'
o
il
'
&&
geojson
.
features
[
0
].
properties
.
subtype
==
'
spill
'
)
{
self
.
clear
();
for
(
var
i
in
self
.
cardMap
)
{
if
(
self
.
cardMap
.
hasOwnProperty
(
i
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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