Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
stw
stwkit
Commits
862ea9f6
Commit
862ea9f6
authored
Oct 04, 2017
by
Tomas Pettersson
🏸
Browse files
uncertainty is not optional to show
parent
d3f7288b
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
src/components/cards.js
View file @
862ea9f6
...
@@ -988,6 +988,9 @@ var STWkit;
...
@@ -988,6 +988,9 @@ var STWkit;
if
((
_this
.
forcing
.
features
.
length
>
0
)
&&
(
_this
.
forcing
.
features
[
0
].
properties
))
if
((
_this
.
forcing
.
features
.
length
>
0
)
&&
(
_this
.
forcing
.
features
[
0
].
properties
))
_this
.
forcingmodel
=
_this
.
forcing
.
features
[
0
].
properties
.
model
;
_this
.
forcingmodel
=
_this
.
forcing
.
features
[
0
].
properties
.
model
;
}
}
_this
.
showuncertainty
=
true
;
if
(
typeof
options
.
uncertainty
!==
"
undefined
"
)
_this
.
showuncertainty
=
options
.
uncertainty
;
_this
.
cardMap
=
{};
_this
.
cardMap
=
{};
return
_this
;
return
_this
;
}
}
...
@@ -1068,6 +1071,8 @@ var STWkit;
...
@@ -1068,6 +1071,8 @@ var STWkit;
self
.
uncertaintyInput
=
L
.
DomUtil
.
create
(
'
input
'
,
''
,
uncertaintyLabel
);
self
.
uncertaintyInput
=
L
.
DomUtil
.
create
(
'
input
'
,
''
,
uncertaintyLabel
);
self
.
uncertaintyInput
.
type
=
'
checkbox
'
;
self
.
uncertaintyInput
.
type
=
'
checkbox
'
;
uncertaintyLabel
.
appendChild
(
document
.
createTextNode
(
'
Extra uncertainty in weather forecast is added to simulation
'
));
uncertaintyLabel
.
appendChild
(
document
.
createTextNode
(
'
Extra uncertainty in weather forecast is added to simulation
'
));
if
(
!
this
.
showuncertainty
)
uncertaintyRowDiv
.
style
.
display
=
'
none
'
;
var
hr
=
L
.
DomUtil
.
create
(
'
hr
'
,
'
uk-margin-top
'
,
self
.
startDiv
);
var
hr
=
L
.
DomUtil
.
create
(
'
hr
'
,
'
uk-margin-top
'
,
self
.
startDiv
);
self
.
startButton
=
L
.
DomUtil
.
create
(
'
button
'
,
'
uk-button uk-button-success uk-margin-top uk-align-center
'
,
self
.
startDiv
);
self
.
startButton
=
L
.
DomUtil
.
create
(
'
button
'
,
'
uk-button uk-button-success uk-margin-top uk-align-center
'
,
self
.
startDiv
);
self
.
startButton
.
textContent
=
'
Start model
'
;
self
.
startButton
.
textContent
=
'
Start model
'
;
...
...
src/components/cards.js.map
View file @
862ea9f6
This diff is collapsed.
Click to expand it.
src/components/cards.ts
View file @
862ea9f6
...
@@ -1077,6 +1077,7 @@ module STWkit {
...
@@ -1077,6 +1077,7 @@ module STWkit {
private
subtype
:
string
;
private
subtype
:
string
;
private
name
:
string
;
private
name
:
string
;
private
initials
:
string
;
private
initials
:
string
;
private
showuncertainty
:
boolean
;
constructor
(
options
)
{
constructor
(
options
)
{
super
(
options
);
super
(
options
);
...
@@ -1097,7 +1098,11 @@ module STWkit {
...
@@ -1097,7 +1098,11 @@ module STWkit {
this
.
forcing
=
options
.
forcing
;
this
.
forcing
=
options
.
forcing
;
if
((
this
.
forcing
.
features
.
length
>
0
)
&&
(
this
.
forcing
.
features
[
0
].
properties
))
if
((
this
.
forcing
.
features
.
length
>
0
)
&&
(
this
.
forcing
.
features
[
0
].
properties
))
this
.
forcingmodel
=
this
.
forcing
.
features
[
0
].
properties
.
model
;
this
.
forcingmodel
=
this
.
forcing
.
features
[
0
].
properties
.
model
;
}
}
this
.
showuncertainty
=
true
;
if
(
typeof
options
.
uncertainty
!==
"
undefined
"
)
this
.
showuncertainty
=
options
.
uncertainty
;
this
.
cardMap
=
{};
this
.
cardMap
=
{};
}
}
...
@@ -1182,6 +1187,7 @@ module STWkit {
...
@@ -1182,6 +1187,7 @@ module STWkit {
self
.
uncertaintyInput
=
<
HTMLInputElement
>
L
.
DomUtil
.
create
(
'
input
'
,
''
,
uncertaintyLabel
);
self
.
uncertaintyInput
=
<
HTMLInputElement
>
L
.
DomUtil
.
create
(
'
input
'
,
''
,
uncertaintyLabel
);
self
.
uncertaintyInput
.
type
=
'
checkbox
'
;
self
.
uncertaintyInput
.
type
=
'
checkbox
'
;
uncertaintyLabel
.
appendChild
(
document
.
createTextNode
(
'
Extra uncertainty in weather forecast is added to simulation
'
));
uncertaintyLabel
.
appendChild
(
document
.
createTextNode
(
'
Extra uncertainty in weather forecast is added to simulation
'
));
if
(
!
this
.
showuncertainty
)
uncertaintyRowDiv
.
style
.
display
=
'
none
'
;
var
hr
=
<
HTMLDivElement
>
L
.
DomUtil
.
create
(
'
hr
'
,
'
uk-margin-top
'
,
self
.
startDiv
);
var
hr
=
<
HTMLDivElement
>
L
.
DomUtil
.
create
(
'
hr
'
,
'
uk-margin-top
'
,
self
.
startDiv
);
self
.
startButton
=
<
HTMLButtonElement
>
L
.
DomUtil
.
create
(
'
button
'
,
'
uk-button uk-button-success uk-margin-top uk-align-center
'
,
self
.
startDiv
);
self
.
startButton
=
<
HTMLButtonElement
>
L
.
DomUtil
.
create
(
'
button
'
,
'
uk-button uk-button-success uk-margin-top uk-align-center
'
,
self
.
startDiv
);
...
...
Write
Preview
Supports
Markdown
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