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-exercise-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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
stw
leaflet-exercise-control
Commits
983792c8
Commit
983792c8
authored
Feb 09, 2018
by
Pettersson Tomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
recode
parent
72c1916b
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
123 additions
and
82 deletions
+123
-82
src/leaflet-exercise-cards.js
src/leaflet-exercise-cards.js
+48
-33
src/leaflet-exercise-cards.js.map
src/leaflet-exercise-cards.js.map
+1
-1
src/leaflet-exercise-cards.ts
src/leaflet-exercise-cards.ts
+63
-39
src/leaflet-exercise-control.js
src/leaflet-exercise-control.js
+5
-4
src/leaflet-exercise-control.js.map
src/leaflet-exercise-control.js.map
+1
-1
src/leaflet-exercise-control.ts
src/leaflet-exercise-control.ts
+5
-4
No files found.
src/leaflet-exercise-cards.js
View file @
983792c8
...
...
@@ -402,12 +402,14 @@ var EXTrajectory = (function (_super) {
self
.
endDateInput
.
onchange
=
function
(
evt
)
{
var
date
=
moment
.
utc
(
self
.
endDateInput
.
value
+
'
'
+
self
.
endTimeInput
.
value
,
self
.
datetimeFormat
);
self
.
to
=
date
.
clone
();
self
.
setTimeIncrement
()
&&
self
.
setTime
()
&&
self
.
updateTrajectoryLabelTimeValues
();
self
.
refreshTrajectory
();
self
.
fireChangeFn
(
self
);
};
self
.
endTimeInput
.
onchange
=
function
(
evt
)
{
var
date
=
moment
.
utc
(
self
.
endDateInput
.
value
+
'
'
+
self
.
endTimeInput
.
value
,
self
.
datetimeFormat
);
self
.
to
=
date
.
clone
();
self
.
setTimeIncrement
()
&&
self
.
setTime
()
&&
self
.
updateTrajectoryLabelTimeValues
();
self
.
refreshTrajectory
();
self
.
fireChangeFn
(
self
);
};
positionDiv
.
guideFn
=
function
()
{
var
geojson
=
{};
...
...
@@ -450,25 +452,8 @@ var EXTrajectory = (function (_super) {
map
.
on
(
'
draw:created
'
,
function
(
e
)
{
var
type
=
e
.
layerType
,
layer
=
e
.
layer
;
if
(
type
==
'
draw
'
+
id
)
{
var
trajlinefeature
=
layer
.
toGeoJSON
();
if
((
trajlinefeature
.
geometry
)
&&
(
trajlinefeature
.
geometry
.
coordinates
.
length
>
2
))
{
self
.
trajlength
=
trajlinefeature
.
geometry
.
coordinates
.
length
;
self
.
setTimeIncrement
()
&&
self
.
setTime
();
self
.
trajectoryLayer
.
addData
(
trajlinefeature
);
self
.
trajpointfeaturecollection
=
STWkit
.
featurecollection
();
for
(
var
i
=
0
;
i
<
self
.
time
.
length
;
i
++
)
{
var
trajpointfeature
=
STWkit
.
createFeature
(
"
Point
"
);
trajpointfeature
.
geometry
.
coordinates
=
trajlinefeature
.
geometry
.
coordinates
[
i
];
trajpointfeature
.
properties
.
time
=
self
.
time
[
i
];
if
(
i
==
0
)
trajpointfeature
.
properties
.
start
=
true
;
if
(
i
==
self
.
time
.
length
-
1
)
trajpointfeature
.
properties
.
end
=
true
;
self
.
trajpointfeaturecollection
.
features
.
push
(
trajpointfeature
);
}
self
.
trajectoryLabelLayer
.
addData
(
self
.
trajpointfeaturecollection
);
self
.
updateTrajectoryLabelVisibility
();
}
self
.
drawnfeature
=
layer
.
toGeoJSON
();
self
.
refreshTrajectory
();
var
toggleevt
=
document
.
createEvent
(
"
CustomEvent
"
);
toggleevt
.
initCustomEvent
(
'
container:toggleVisibility
'
,
false
,
false
,
{
'
show
'
:
true
...
...
@@ -579,18 +564,51 @@ var EXTrajectory = (function (_super) {
self
.
endDateInput
.
value
=
self
.
to
.
format
(
self
.
dateFormat
);
self
.
endTimeInput
.
value
=
self
.
to
.
startOf
(
'
hour
'
).
format
(
self
.
timeFormat
);
}
self
.
setTimeIncrement
()
&&
self
.
setTime
()
&&
self
.
updateTrajectoryLabelTimeValues
();
self
.
refreshTrajectory
();
}
};
EXTrajectory
.
prototype
.
setTimeIncrement
=
function
()
{
this
.
timeIncrement
=
-
1
;
var
len
=
this
.
trajlength
;
if
(
len
>
0
)
{
var
diff
=
Math
.
abs
(
this
.
from
-
this
.
to
);
this
.
timeIncrement
=
Math
.
round
(((
diff
/
1000
)
/
60
)
/
len
);
return
true
;
EXTrajectory
.
prototype
.
refreshTrajectory
=
function
()
{
var
self
=
this
;
if
(
this
.
drawnfeature
&&
this
.
drawnfeature
.
geometry
&&
this
.
drawnfeature
.
geometry
.
coordinates
.
length
>
2
)
{
self
.
trajMarkerArray
=
[];
self
.
trajectoryLayer
.
clearLayers
();
self
.
trajectoryLabelLayer
.
clearLayers
();
var
timeIncrement
=
15
;
var
currentlength
=
self
.
drawnfeature
.
geometry
.
coordinates
.
length
;
var
wantedTimeIncrementlength
=
Math
.
round
(((
Math
.
abs
(
this
.
from
-
this
.
to
)
/
1000
)
/
60
)
/
timeIncrement
);
var
coords
=
self
.
drawnfeature
.
geometry
.
coordinates
.
slice
(
0
);
while
(
coords
.
length
<
wantedTimeIncrementlength
)
{
// too small, add points
var
index
=
self
.
getRandomInt
(
1
,
currentlength
-
1
);
coords
.
splice
(
index
,
0
,
[
coords
[
index
][
0
],
coords
[
index
][
1
]]);
}
self
.
time
=
[];
var
t
=
self
.
from
.
clone
();
for
(
var
i
=
0
;
i
<
coords
.
length
;
i
++
)
{
self
.
time
.
push
(
t
.
valueOf
());
t
=
t
.
add
(
timeIncrement
,
'
m
'
);
}
self
.
time
[
self
.
time
.
length
-
1
]
=
self
.
to
.
valueOf
();
var
trajfeature
=
STWkit
.
createFeature
(
"
LineString
"
);
trajfeature
.
geometry
.
coordinates
=
coords
;
self
.
trajectoryLayer
.
addData
(
trajfeature
);
var
trajpointfeaturecollection
=
STWkit
.
featurecollection
();
for
(
var
i
=
0
;
i
<
coords
.
length
;
i
++
)
{
var
trajpointfeature
=
STWkit
.
createFeature
(
"
Point
"
);
trajpointfeature
.
geometry
.
coordinates
=
coords
[
i
];
trajpointfeature
.
properties
.
time
=
self
.
time
[
i
];
if
(
i
==
0
)
trajpointfeature
.
properties
.
start
=
true
;
if
(
i
==
self
.
time
.
length
-
1
)
trajpointfeature
.
properties
.
end
=
true
;
trajpointfeaturecollection
.
features
.
push
(
trajpointfeature
);
}
self
.
trajectoryLabelLayer
.
addData
(
trajpointfeaturecollection
);
self
.
updateTrajectoryLabelVisibility
();
}
return
false
;
};
EXTrajectory
.
prototype
.
getRandomInt
=
function
(
min
,
max
)
{
return
Math
.
floor
(
Math
.
random
()
*
(
max
-
min
+
1
))
+
min
;
};
EXTrajectory
.
prototype
.
setTime
=
function
()
{
var
self
=
this
;
...
...
@@ -696,9 +714,6 @@ var EXTrajectory = (function (_super) {
self
.
trajMarkerArray
=
[];
if
(
self
.
lineHandler
.
_enabled
)
self
.
lineHandler
.
disable
();
self
.
timeIncrement
=
-
1
;
self
.
trajlength
=
0
;
self
.
time
=
[];
if
(
self
.
nextButton
)
STWkit
.
AccordionCard
.
enableNext
(
self
.
nextButton
,
false
);
(
self
.
oncallback
&&
self
.
oncallback
());
...
...
src/leaflet-exercise-cards.js.map
View file @
983792c8
This diff is collapsed.
Click to expand it.
src/leaflet-exercise-cards.ts
View file @
983792c8
...
...
@@ -410,6 +410,7 @@ class EXTrajectory extends STWkit.AccordionCard {
public
oncallback
:
Function
;
public
lineButton
:
HTMLButtonElement
;
private
lineHandler
:
any
;
private
drawnfeature
:
any
;
private
trajectoryLayer
:
L
.
GeoJSON
;
private
trajectoryLabelLayer
:
any
;
private
trajMarkerArray
:
any
[];
...
...
@@ -419,9 +420,6 @@ class EXTrajectory extends STWkit.AccordionCard {
private
time
:
any
;
private
from
:
any
;
private
to
:
any
;
private
trajlength
:
number
;
private
trajpointfeaturecollection
:
any
;
private
timeIncrement
:
number
;
// minutes
public
nextButton
:
any
;
endDateInput
:
HTMLInputElement
;
endTimeInput
:
HTMLInputElement
;
...
...
@@ -471,17 +469,18 @@ class EXTrajectory extends STWkit.AccordionCard {
self
.
endDateInput
.
onchange
=
function
(
evt
)
{
var
date
=
moment
.
utc
(
self
.
endDateInput
.
value
+
'
'
+
self
.
endTimeInput
.
value
,
self
.
datetimeFormat
);
self
.
to
=
date
.
clone
();
self
.
setTimeIncrement
()
&&
self
.
setTime
()
&&
self
.
updateTrajectoryLabelTimeValues
();
self
.
to
=
date
.
clone
();
self
.
refreshTrajectory
();
self
.
fireChangeFn
(
self
);
};
self
.
endTimeInput
.
onchange
=
function
(
evt
)
{
var
date
=
moment
.
utc
(
self
.
endDateInput
.
value
+
'
'
+
self
.
endTimeInput
.
value
,
self
.
datetimeFormat
);
self
.
to
=
date
.
clone
();
self
.
setTimeIncrement
()
&&
self
.
setTime
()
&&
self
.
updateTrajectoryLabelTimeValues
();
self
.
refreshTrajectory
();
self
.
fireChangeFn
(
self
);
};
positionDiv
.
guideFn
=
function
()
{
...
...
@@ -531,25 +530,8 @@ class EXTrajectory extends STWkit.AccordionCard {
var
type
=
e
.
layerType
,
layer
=
e
.
layer
;
if
(
type
==
'
draw
'
+
id
)
{
var
trajlinefeature
=
layer
.
toGeoJSON
();
if
((
trajlinefeature
.
geometry
)
&&
(
trajlinefeature
.
geometry
.
coordinates
.
length
>
2
))
{
self
.
trajlength
=
trajlinefeature
.
geometry
.
coordinates
.
length
;
self
.
setTimeIncrement
()
&&
self
.
setTime
();
self
.
trajectoryLayer
.
addData
(
trajlinefeature
);
self
.
trajpointfeaturecollection
=
STWkit
.
featurecollection
();
for
(
var
i
=
0
;
i
<
self
.
time
.
length
;
i
++
)
{
var
trajpointfeature
:
any
=
STWkit
.
createFeature
(
"
Point
"
);
trajpointfeature
.
geometry
.
coordinates
=
trajlinefeature
.
geometry
.
coordinates
[
i
];
trajpointfeature
.
properties
.
time
=
self
.
time
[
i
];
if
(
i
==
0
)
trajpointfeature
.
properties
.
start
=
true
;
if
(
i
==
self
.
time
.
length
-
1
)
trajpointfeature
.
properties
.
end
=
true
;
self
.
trajpointfeaturecollection
.
features
.
push
(
trajpointfeature
);
}
self
.
trajectoryLabelLayer
.
addData
(
self
.
trajpointfeaturecollection
);
self
.
updateTrajectoryLabelVisibility
();
}
self
.
drawnfeature
=
layer
.
toGeoJSON
();
self
.
refreshTrajectory
();
var
toggleevt
=
document
.
createEvent
(
"
CustomEvent
"
);
toggleevt
.
initCustomEvent
(
'
container:toggleVisibility
'
,
false
,
false
,
{
'
show
'
:
true
...
...
@@ -671,19 +653,64 @@ class EXTrajectory extends STWkit.AccordionCard {
self
.
endDateInput
.
value
=
self
.
to
.
format
(
self
.
dateFormat
);
self
.
endTimeInput
.
value
=
self
.
to
.
startOf
(
'
hour
'
).
format
(
self
.
timeFormat
);
}
self
.
setTimeIncrement
()
&&
self
.
setTime
()
&&
self
.
updateTrajectoryLabelTimeValues
();
self
.
refreshTrajectory
();
}
}
private
refreshTrajectory
(){
var
self
=
this
;
private
setTimeIncrement
(){
this
.
timeIncrement
=
-
1
;
var
len
=
this
.
trajlength
;
if
(
len
>
0
)
{
var
diff
=
Math
.
abs
(
this
.
from
-
this
.
to
);
this
.
timeIncrement
=
Math
.
round
(((
diff
/
1000
)
/
60
)
/
len
);
return
true
;
if
(
this
.
drawnfeature
&&
this
.
drawnfeature
.
geometry
&&
this
.
drawnfeature
.
geometry
.
coordinates
.
length
>
2
)
{
self
.
trajMarkerArray
=
[];
self
.
trajectoryLayer
.
clearLayers
();
self
.
trajectoryLabelLayer
.
clearLayers
();
var
timeIncrement
=
15
;
var
currentlength
=
self
.
drawnfeature
.
geometry
.
coordinates
.
length
;
var
wantedTimeIncrementlength
=
Math
.
round
(((
Math
.
abs
(
this
.
from
-
this
.
to
)
/
1000
)
/
60
)
/
timeIncrement
);
var
coords
=
self
.
drawnfeature
.
geometry
.
coordinates
.
slice
(
0
);
while
(
coords
.
length
<
wantedTimeIncrementlength
)
{
// too small, add points
var
index
=
self
.
getRandomInt
(
1
,
currentlength
-
1
);
coords
.
splice
(
index
,
0
,
[
coords
[
index
][
0
],
coords
[
index
][
1
]]);
}
self
.
time
=
[];
var
t
=
self
.
from
.
clone
();
for
(
var
i
=
0
;
i
<
coords
.
length
;
i
++
)
{
self
.
time
.
push
(
t
.
valueOf
());
t
=
t
.
add
(
timeIncrement
,
'
m
'
);
}
self
.
time
[
self
.
time
.
length
-
1
]
=
self
.
to
.
valueOf
();
var
trajfeature
:
any
=
STWkit
.
createFeature
(
"
LineString
"
);
trajfeature
.
geometry
.
coordinates
=
coords
;
self
.
trajectoryLayer
.
addData
(
trajfeature
);
var
trajpointfeaturecollection
=
STWkit
.
featurecollection
();
for
(
var
i
=
0
;
i
<
coords
.
length
;
i
++
)
{
var
trajpointfeature
:
any
=
STWkit
.
createFeature
(
"
Point
"
);
trajpointfeature
.
geometry
.
coordinates
=
coords
[
i
];
trajpointfeature
.
properties
.
time
=
self
.
time
[
i
];
if
(
i
==
0
)
trajpointfeature
.
properties
.
start
=
true
;
if
(
i
==
self
.
time
.
length
-
1
)
trajpointfeature
.
properties
.
end
=
true
;
trajpointfeaturecollection
.
features
.
push
(
trajpointfeature
);
}
self
.
trajectoryLabelLayer
.
addData
(
trajpointfeaturecollection
);
self
.
updateTrajectoryLabelVisibility
();
}
return
false
;
}
private
getRandomInt
(
min
,
max
)
{
return
Math
.
floor
(
Math
.
random
()
*
(
max
-
min
+
1
))
+
min
;
}
public
setTime
()
{
...
...
@@ -793,9 +820,6 @@ class EXTrajectory extends STWkit.AccordionCard {
self
.
trajectoryLayer
.
clearLayers
()
self
.
trajMarkerArray
=
[];
if
(
self
.
lineHandler
.
_enabled
)
self
.
lineHandler
.
disable
();
self
.
timeIncrement
=
-
1
;
self
.
trajlength
=
0
;
self
.
time
=
[];
if
(
self
.
nextButton
)
STWkit
.
AccordionCard
.
enableNext
(
self
.
nextButton
,
false
);
(
self
.
oncallback
&&
self
.
oncallback
());
}
...
...
src/leaflet-exercise-control.js
View file @
983792c8
...
...
@@ -43,7 +43,7 @@ var L;
this
.
accordionDiv
=
L
.
DomUtil
.
create
(
'
div
'
,
'
uk-accordion
'
,
this
.
container
);
var
locationid
=
self
.
initials
+
'
locationCard
'
;
self
.
cardMap
[
locationid
]
=
new
EXLocation
(
locationid
,
this
.
accordionDiv
,
self
.
lang
,
self
.
langData
,
map
,
self
.
forcing
,
self
.
obs
,
self
.
type
,
self
.
subtype
,
self
.
initials
);
self
.
cardMap
[
locationid
].
show
();
//
self.cardMap[locationid].show();
var
periodid
=
self
.
initials
+
'
periodCard
'
;
var
periodoptions
=
{};
periodoptions
[
'
type
'
]
=
this
.
type
;
...
...
@@ -62,11 +62,12 @@ var L;
var
trajectoryid
=
self
.
initials
+
'
trajectoryCard
'
;
self
.
cardMap
[
trajectoryid
]
=
new
EXTrajectory
(
trajectoryid
,
this
.
accordionDiv
,
self
.
lang
,
self
.
langData
,
map
,
self
.
domain
,
self
.
type
,
self
.
subtype
,
self
.
initials
);
this
.
cardMap
[
periodid
].
addChangeFnListener
(
this
.
cardMap
[
trajectoryid
]);
// self.cardMap[trajectoryid].show(); // comment out
this
.
cardMap
[
trajectoryid
].
addChangeFnListener
(
this
.
cardMap
[
periodid
]);
self
.
cardMap
[
trajectoryid
].
show
();
// comment out
_super
.
prototype
.
setup
.
call
(
this
,
map
);
var
chain
=
[];
chain
[
locationid
]
=
periodid
;
//
chain[trajectoryid] = periodid; // comment out
//
chain[locationid] = periodid;
chain
[
trajectoryid
]
=
periodid
;
// comment out
chain
[
periodid
]
=
oiltypeid
;
chain
[
oiltypeid
]
=
amountid
;
chain
[
amountid
]
=
trajectoryid
;
...
...
src/leaflet-exercise-control.js.map
View file @
983792c8
{"version":3,"file":"leaflet-exercise-control.js","sourceRoot":"","sources":["leaflet-exercise-control.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,yCAAyC;AACzC,yCAAyC;AACzC,wCAAwC;AACxC,wCAAwC;AACxC,yCAAyC;AACzC,kDAAkD;;;;;;;;;;;AAKlD,IAAO,CAAC,CAuGP;AAvGD,WAAO,CAAC;IAAC,IAAA,OAAO,CAuGf;IAvGQ,WAAA,OAAO;QACZ;YAA8B,4BAAkB;YAgB5C,kBAAY,OAAO;gBAAnB,YACI,kBAAM,OAAO,CAAC,SAcjB;gBAbG,KAAI,CAAC,MAAM,GAAG,QAAQ,CAAC;gBACvB,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;oBACjB,KAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;gBACjC,CAAC;gBAED,KAAI,CAAC,IAAI,GAAG,UAAU,CAAC;gBACvB,KAAI,CAAC,OAAO,GAAG,SAAS,CAAC;gBACzB,KAAI,CAAC,IAAI,GAAG,UAAU,CAAC;gBACvB,KAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;gBACrB,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;oBAChB,KAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;gBACzB,CAAC;;YAEL,CAAC;YAEO,wBAAK,GAAb,UAAc,GAAG;gBAAjB,iBAsDC;gBArDG,IAAI,IAAI,GAAG,IAAI,CAAC;gBAChB,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,GAAC,UAAU,CAAC,CAAC;gBAC/D,IAAI,CAAC,YAAY,GAAmB,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;gBAC5F,IAAI,UAAU,GAAG,IAA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E,MAAM,CAAC,CAAC;gBAChD,CAAC,CAAC;YAIN,CAAC;YAEM,wBAAK,GAAZ,UAAa,IAAI;gBACb,iBAAM,KAAK,YAAC,IAAI,CAAC,CAAC;YACtB,CAAC;YAEO,wBAAK,GAAb;gBACI,iBAAM,KAAK,WAAE,CAAC;YAClB,CAAC;YACO,uBAAI,GAAZ;YACA,CAAC;YACO,uBAAI,GAAZ;YACA,CAAC;YAEL,eAAC;QAAD,CAAC,AAtGD,CAA8B,MAAM,CAAC,WAAW,GAsG/C;QAtGY,gBAAQ,WAsGpB,CAAA;IACL,CAAC,EAxGQ,OAAO,GAAP,SAAO,KAAP,SAAO,QAwGf;AAAD,CAAC,EAxGM,CAAC,KAAD,CAAC,QAwGP"}
\ No newline at end of file
src/leaflet-exercise-control.ts
View file @
983792c8
...
...
@@ -49,7 +49,7 @@ module L.Control {
this
.
accordionDiv
=
<
HTMLDivElement
>
L
.
DomUtil
.
create
(
'
div
'
,
'
uk-accordion
'
,
this
.
container
);
var
locationid
=
self
.
initials
+
'
locationCard
'
;
self
.
cardMap
[
locationid
]
=
new
EXLocation
(
locationid
,
this
.
accordionDiv
,
self
.
lang
,
self
.
langData
,
map
,
self
.
forcing
,
self
.
obs
,
self
.
type
,
self
.
subtype
,
self
.
initials
);
self
.
cardMap
[
locationid
].
show
();
//
self.cardMap[locationid].show();
var
periodid
=
self
.
initials
+
'
periodCard
'
;
var
periodoptions
=
{};
periodoptions
[
'
type
'
]
=
this
.
type
;
...
...
@@ -69,11 +69,12 @@ module L.Control {
var
trajectoryid
=
self
.
initials
+
'
trajectoryCard
'
;
self
.
cardMap
[
trajectoryid
]
=
new
EXTrajectory
(
trajectoryid
,
this
.
accordionDiv
,
self
.
lang
,
self
.
langData
,
map
,
self
.
domain
,
self
.
type
,
self
.
subtype
,
self
.
initials
);
this
.
cardMap
[
periodid
].
addChangeFnListener
(
this
.
cardMap
[
trajectoryid
]);
// self.cardMap[trajectoryid].show(); // comment out
this
.
cardMap
[
trajectoryid
].
addChangeFnListener
(
this
.
cardMap
[
periodid
]);
self
.
cardMap
[
trajectoryid
].
show
();
// comment out
super
.
setup
(
map
);
var
chain
=
[];
chain
[
locationid
]
=
periodid
;
//
chain[trajectoryid] = periodid; // comment out
//
chain[locationid] = periodid;
chain
[
trajectoryid
]
=
periodid
;
// comment out
chain
[
periodid
]
=
oiltypeid
;
chain
[
oiltypeid
]
=
amountid
;
...
...
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