Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
stwkit
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
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
stw
stwkit
Commits
e5c98474
Commit
e5c98474
authored
Oct 02, 2017
by
Tomas Pettersson
🏸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added oiltypecard
parent
2e9d8897
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
513 additions
and
22 deletions
+513
-22
demo/index.html
demo/index.html
+13
-18
src/components/cards.js
src/components/cards.js
+237
-0
src/components/cards.js.map
src/components/cards.js.map
+1
-1
src/components/cards.ts
src/components/cards.ts
+262
-3
No files found.
demo/index.html
View file @
e5c98474
...
...
@@ -153,23 +153,6 @@
};
if
(
forcing
.
features
.
length
>
0
)
properties
[
"
forcing
"
]
=
forcing
;
// SimpleCardControl = STWkit.CardControl.extend({
// setup: function (map) {
// this.container = STWkit.DomUtil.create('div', +self.name+'-control');
// this.accordionDiv = STWkit.DomUtil.create('div', 'uk-accordion', this.container);
// var locationid = self.initials+'locationCard';
// self.cardMap[locationid] = new Location(locationid, this.accordionDiv, self.lang, self.langData, map, self.forcing);
// self.cardMap[locationid].show();
// // super.setup(map);
// },
// show: function() {},
// // ready: function(name) {super.ready(name)},
// // clear: function() {super.clear()},
// // hide: function() {super.hide()}
// });
class
SimpleCardControl
extends
STWkit
.
CardControl
{
constructor
(
options
)
{
super
(
options
);}
setup
(
map
)
{
...
...
@@ -196,16 +179,28 @@
// periodoptions['forwardbackward'] = false;
var
periodid
=
'
periodCard
'
;
this
.
cardMap
[
periodid
]
=
new
STWkit
.
PeriodCard
(
periodid
,
'
Simulation period
'
,
this
.
accordionDiv
,
this
.
lang
,
map
,
this
.
domain
,
this
.
forcingmodel
,
periodoptions
);
var
oiltypeoptions
=
{};
oiltypeoptions
[
'
type
'
]
=
type
;
oiltypeoptions
[
'
initials
'
]
=
initials
;
var
oiltypeid
=
'
oiltypeCard
'
;
this
.
cardMap
[
oiltypeid
]
=
new
STWkit
.
OilTypeCard
(
oiltypeid
,
'
Type of oil
'
,
this
.
accordionDiv
,
this
.
lang
,
map
,
oiltypeoptions
);
this
.
cardMap
[
periodid
].
addChangeFnListener
(
this
.
cardMap
[
oiltypeid
]);
super
.
setup
(
map
);
var
chain
=
[];
chain
[
locationid
]
=
periodid
;
chain
[
periodid
]
=
''
;
chain
[
periodid
]
=
oiltypeid
;
chain
[
oiltypeid
]
=
''
;
this
.
cardMap
[
locationid
].
oncallback
=
(
gonext
)
=>
{
super
.
callback
(
chain
,
locationid
,
gonext
);
};
this
.
cardMap
[
periodid
].
oncallback
=
(
gonext
)
=>
{
super
.
callback
(
chain
,
periodid
,
gonext
);
};
this
.
cardMap
[
oiltypeid
].
oncallback
=
(
gonext
)
=>
{
super
.
callback
(
chain
,
oiltypeid
,
gonext
);
};
}
show
()
{}
hide
()
{}
...
...
src/components/cards.js
View file @
e5c98474
This diff is collapsed.
Click to expand it.
src/components/cards.js.map
View file @
e5c98474
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/components/cards.ts
View file @
e5c98474
This diff is collapsed.
Click to expand it.
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