Skip to content

Commit

Permalink
fix(track): ensure places node list will update when track name changes
Browse files Browse the repository at this point in the history
Resolves ngageoint#842

The caller updating the track name (or other values) still has to call
track.dispatchEvent(new os.events.PropertyChangeEvent(os.annotation.EventType.UPDATE_PLACEMARK));
  • Loading branch information
bradh committed Dec 13, 2020
1 parent 2fb52fa commit 01c78ed
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/plugin/track/track.js
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ plugin.track.updateTrackZIndex = os.track.updateTrackZIndex;
*
* @param {!os.track.CreateOptions} options The options object for the track.
* @return {os.track.TrackFeatureLike|undefined} The track feature.
* @suppress {accessControls} for onFeatureChange access
*/
plugin.track.createAndAdd = function(options) {
var track = os.track.createTrack(options);
Expand All @@ -479,6 +480,7 @@ plugin.track.createAndAdd = function(options) {
var trackNode = plugin.file.kml.ui.updatePlacemark({
'feature': track
});
ol.events.listen(track, goog.events.EventType.PROPERTYCHANGE, trackNode.onFeatureChange, trackNode);

var rootNode = plugin.places.PlacesManager.getInstance().getPlacesRoot();
if (rootNode) {
Expand Down

0 comments on commit 01c78ed

Please sign in to comment.