Skip to content

Commit

Permalink
Merge pull request #11 from conterra/10-cannot-open-new-toc-timeslide…
Browse files Browse the repository at this point in the history
…r-without-closing-the-previous-one

10 cannot open new toc timeslider without closing the previous one
  • Loading branch information
sholtkamp authored Aug 13, 2024
2 parents e1cbfb9 + 8f755e6 commit 8b05cf8
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
27 changes: 26 additions & 1 deletion src/main/js/apps/sample/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,32 @@
"id": 2,
"visible": true
}
]
],
"timeSlider": {
"timeExtent": {
"start": "2019-04-15T00:00Z",
"end": "2019-04-15T00:00Z"
},
"fullTimeExtent": {
"start": "2019-01-01T00:00Z",
"end": "2019-12-31T00:00Z"
},
"stops": {
"interval": {
"value": 1,
"unit": "weeks"
},
"timeExtent": {
"start": "2019-04-01T00:00Z",
"end": "2019-10-06T00:00Z"
}
},
"mode": "instant",
"loop": true,
"playRate": 1000,
"playOnStartup": true,
"timeVisible": false
}
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ export default class TimeSliderTocActionDefinitionFactory {
},

trigger(tocItem: any) {
if (that.serviceRegistration) {
that.serviceRegistration.unregister();
that.serviceRegistration = null;
}
const layer = tocItem.ref as ExtendedLayer;
const controller = timeSliderWidgetController;
const timeSliderProperties = tocItem.ref.timeSlider;
Expand Down

0 comments on commit 8b05cf8

Please sign in to comment.