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
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
Incidents
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
c63a373d
Commit
c63a373d
authored
Sep 28, 2017
by
Tomas Pettersson
🏸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added positions with max depth
parent
4e871785
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
10 deletions
+12
-10
src/components/cards.js
src/components/cards.js
+5
-4
src/components/cards.js.map
src/components/cards.js.map
+1
-1
src/components/cards.ts
src/components/cards.ts
+6
-5
No files found.
src/components/cards.js
View file @
c63a373d
...
...
@@ -155,7 +155,7 @@ var STWkit;
self
.
polygonButton
.
onclick
=
function
()
{
self
.
geometryType
=
"
polygon
"
;
self
.
control
.
setType
(
self
.
geometryType
);
};
self
.
circleButton
.
onclick
=
function
()
{
self
.
geometryType
=
"
circle
"
;
self
.
control
.
setType
(
self
.
geometryType
);
};
self
.
polygonButton
.
disabled
=
false
;
self
.
hasPosition
=
false
;
self
.
positions
=
[]
;
var
positionLabelGrid
=
L
.
DomUtil
.
create
(
'
div
'
,
'
uk-grid uk-margin-top
'
,
self
.
locationForm
);
var
positionlabelDiv
=
L
.
DomUtil
.
create
(
'
div
'
,
'
uk-width-1-1
'
,
positionLabelGrid
);
_super
.
prototype
.
addLabelDiv
.
call
(
_this
,
positionlabelDiv
,
"
Position
"
,
"
See more information <a style='color:#faa732;' href='help/classic/#oil-oo-position' target='_blank'>here</a>
"
);
...
...
@@ -203,7 +203,7 @@ var STWkit;
"
buttons
"
:
false
,
"
tabs
"
:
false
,
"
callback
"
:
function
(
latlngs
,
geojson
)
{
self
.
hasPosition
=
false
;
self
.
positions
=
[]
;
if
(
latlngs
.
length
>
0
)
{
var
toggleevt
=
document
.
createEvent
(
"
CustomEvent
"
);
toggleevt
.
initCustomEvent
(
'
container:toggleVisibility
'
,
false
,
false
,
{
...
...
@@ -244,7 +244,8 @@ var STWkit;
self
.
forcingBoundary
.
addListener
(
self
.
control
.
layers
);
}
self
.
control
.
showTable
();
self
.
hasPosition
=
true
;
for
(
var
i
=
0
;
i
<
coordinates
.
length
;
i
++
)
self
.
positions
.
push
([
coordinates
[
i
][
1
],
coordinates
[
i
][
0
],
self
.
forcingBoundary
.
depth
(
coordinates
[
i
][
1
],
coordinates
[
i
][
0
])]);
self
.
validate
();
}
}
...
...
@@ -326,7 +327,7 @@ var STWkit;
_super
.
prototype
.
show
.
call
(
this
);
};
LocationCard
.
prototype
.
validate
=
function
()
{
if
(
!
this
.
hasPosition
)
if
(
this
.
positions
.
length
==
0
)
return
;
this
.
status
=
true
;
AccordionCard
.
enableNext
(
this
.
nextButton
,
true
);
...
...
src/components/cards.js.map
View file @
c63a373d
This diff is collapsed.
Click to expand it.
src/components/cards.ts
View file @
c63a373d
...
...
@@ -107,7 +107,7 @@ module STWkit {
public
timeFormat
:
string
;
public
datetimeFormat
:
string
;
public
datetimeTFormat
:
string
;
public
hasPosition
:
boolean
;
public
positions
:
any
[]
;
public
geometryType
:
string
;
private
forcingBoundary
:
any
;
private
locationDiv
:
HTMLDivElement
;
...
...
@@ -177,7 +177,7 @@ module STWkit {
self
.
circleButton
.
onclick
=
function
()
{
self
.
geometryType
=
"
circle
"
;
self
.
control
.
setType
(
self
.
geometryType
);
}
self
.
polygonButton
.
disabled
=
false
;
self
.
hasPosition
=
false
;
self
.
positions
=
[]
;
var
positionLabelGrid
=
<
HTMLDivElement
>
L
.
DomUtil
.
create
(
'
div
'
,
'
uk-grid uk-margin-top
'
,
self
.
locationForm
);
...
...
@@ -231,7 +231,7 @@ module STWkit {
"
buttons
"
:
false
,
"
tabs
"
:
false
,
"
callback
"
:
function
(
latlngs
,
geojson
)
{
self
.
hasPosition
=
false
;
self
.
positions
=
[]
;
if
(
latlngs
.
length
>
0
)
{
var
toggleevt
=
document
.
createEvent
(
"
CustomEvent
"
);
toggleevt
.
initCustomEvent
(
'
container:toggleVisibility
'
,
false
,
false
,
{
...
...
@@ -270,7 +270,8 @@ module STWkit {
self
.
forcingBoundary
.
addListener
(
self
.
control
.
layers
);
}
self
.
control
.
showTable
();
self
.
hasPosition
=
true
;
for
(
var
i
=
0
;
i
<
coordinates
.
length
;
i
++
)
self
.
positions
.
push
([
coordinates
[
i
][
1
],
coordinates
[
i
][
0
],
self
.
forcingBoundary
.
depth
(
coordinates
[
i
][
1
],
coordinates
[
i
][
0
])]);
self
.
validate
();
}
}
...
...
@@ -357,7 +358,7 @@ module STWkit {
}
public
validate
()
{
if
(
!
this
.
hasPosition
)
return
;
if
(
this
.
positions
.
length
==
0
)
return
;
this
.
status
=
true
;
AccordionCard
.
enableNext
(
this
.
nextButton
,
true
);
(
this
.
oncallback
&&
this
.
oncallback
());
...
...
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