Skip to content

Commit

Permalink
Merge branch 'master' of /jslave/workspace/uncanny-cougar/downscan/ap…
Browse files Browse the repository at this point in the history
…ply-downscan/downscans/opensphere.2019-02-04-025615Z.bundle
  • Loading branch information
Jenkins Slave user committed Feb 5, 2019
2 parents 8f11f53 + 3bfc3ec commit fd2ca8d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
3 changes: 2 additions & 1 deletion src/os/ui/menu/layermenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ goog.require('ol.extent');
goog.require('os.action.EventType');
goog.require('os.command.FlyToExtent');
goog.require('os.fn');
goog.require('os.layer.ILayer');
goog.require('os.metrics.keys');
goog.require('os.ui.ex.ExportDirective');
goog.require('os.ui.menu.Menu');
Expand Down Expand Up @@ -351,7 +352,7 @@ os.ui.menu.layer.onIdentify_ = function(event) {
// ignore base map and tile layers, we don't want to remove and re-add these during identify
var visibleVectorLayers = os.MapContainer.getInstance().getLayers().filter(function(e) {
// leave the basemaps on, it's slow and ugly to hide during an identify
if (e instanceof plugin.basemap.layer.BaseMap) {
if (/** @type {os.layer.ILayer} */ (e).getOSType() === 'Map Layers') {
return false;
} else if (!ol.array.includes(layers, e)) {
return (e.getVisible() || /** @type {os.layer.ILayer} */ (e).getLayerVisible());
Expand Down
1 change: 1 addition & 0 deletions src/plugin/file/kml/kmlfield.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ goog.require('os.ui.slick.column');
* @enum {string}
*/
plugin.file.kml.KMLField = {
BALLOON_TEXT: '_balloonText',
DESCRIPTION: 'description',
MD_DESCRIPTION: '_mdDescription',
NAME: 'name'
Expand Down
21 changes: 4 additions & 17 deletions src/plugin/file/kml/kmlparser.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ goog.require('os.ui.ScreenOverlayCtrl');
goog.require('os.ui.file.kml');
goog.require('os.xml');
goog.require('plugin.file.kml');
goog.require('plugin.file.kml.KMLField');
goog.require('plugin.file.kml.tour.FlyTo');
goog.require('plugin.file.kml.tour.Tour');
goog.require('plugin.file.kml.tour.TourControl');
Expand Down Expand Up @@ -904,7 +905,8 @@ plugin.file.kml.KMLParser.prototype.examineStyles_ = function(node) {
*/
plugin.file.kml.KMLParser.prototype.readBalloonStyle_ = function(el, feature) {
if (feature.get(os.annotation.OPTIONS_FIELD)) {
// annotation options already set
// the feature is an Open Sphere annotation, so ignore the balloon style. it's there for display in other
// applications, like Google Earth.
return;
}

Expand Down Expand Up @@ -935,22 +937,7 @@ plugin.file.kml.KMLParser.prototype.readBalloonStyle_ = function(el, feature) {

text = os.ui.sanitize(text);

//
// For imported KML balloons:
// - Disable editing
// - Hide if displayMode is set to 'hide'
// - Hide the name header in the annotation
// - Size the overlay to fit the text
//
var annotationOptions =
/** @type {osx.annotation.Options} */ (os.object.unsafeClone(os.annotation.DEFAULT_OPTIONS));
annotationOptions.editable = false;
annotationOptions.show = style['displayMode'] !== 'hide';
annotationOptions.showName = false;
os.annotation.scaleToText(annotationOptions, text);

feature.set(os.annotation.OPTIONS_FIELD, annotationOptions);
feature.set(os.ui.FeatureEditCtrl.Field.MD_DESCRIPTION, text);
feature.set(plugin.file.kml.KMLField.BALLOON_TEXT, text);
}
};

Expand Down
11 changes: 11 additions & 0 deletions src/plugin/track/track.js
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,17 @@ plugin.track.setShowMarker = function(track, show, opt_update) {
*/
plugin.track.setInterpolateMarker = function(track, doInterpolation) {
track.set(plugin.track.TrackField.INTERPOLATE_MARKER, doInterpolation);
if (!doInterpolation) {
track.set(os.interpolate.METHOD_FIELD, os.interpolate.Method.NONE);
var geometry = track.get(os.interpolate.ORIGINAL_GEOM_FIELD);
if (geometry) {
track.set(os.interpolate.ORIGINAL_GEOM_FIELD, undefined);
track.setGeometry(/** @type {ol.geom.Geometry} */ (geometry));
}
} else {
track.set(os.interpolate.METHOD_FIELD, undefined);
os.interpolate.interpolateFeature(track);
}
var range = os.time.TimelineController.getInstance().getCurrentRange();
plugin.track.updateDynamic(track, range.start, range.end);
};
Expand Down

0 comments on commit fd2ca8d

Please sign in to comment.