From 0b29f3cb2b0386e31c00a858c8271e6f8b5faae4 Mon Sep 17 00:00:00 2001 From: Erik Andersson Date: Mon, 30 Jan 2017 15:45:09 +0100 Subject: [PATCH 1/6] Blur input field on enter/geocode --- Source/Widgets/Geocoder/GeocoderViewModel.js | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/Widgets/Geocoder/GeocoderViewModel.js b/Source/Widgets/Geocoder/GeocoderViewModel.js index e1ebc2e3068d..37bafb7aa483 100644 --- a/Source/Widgets/Geocoder/GeocoderViewModel.js +++ b/Source/Widgets/Geocoder/GeocoderViewModel.js @@ -117,6 +117,7 @@ define([ this._searchCommand = createCommand(function() { that.hideSuggestions(); + that._focusTextbox = false; if (defined(that._selectedSuggestion)) { that.activateSuggestion(that._selectedSuggestion); return false; From 38f60982ef0a5c7e5c1de629a6c2af64dd362129 Mon Sep 17 00:00:00 2001 From: Hannah Date: Mon, 30 Jan 2017 14:41:19 -0500 Subject: [PATCH 2/6] Update CHANGES.md --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index f1cee8641821..651aad45773e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -37,6 +37,7 @@ Change Log * Transparent parts of billboards, labels, and points no longer overwrite parts of the scene behind them. [#4886](https://github.com/AnalyticalGraphicsInc/cesium/pull/4886) * Added `blendOption` property to `BillboardCollection`, `LabelCollection`, and `PointPrimitiveCollection`. The default is `BlendOption.OPAQUE_AND_TRANSLUCENT`; however, if all billboards, labels, or points are either completely opaque or completely translucent, `blendOption` can be changed to `BlendOption.OPAQUE` or `BlendOption.TRANSLUCENT`, respectively, to increase performance by up to 2x. * Added the ability to run the unit tests with a [WebGL Stub](https://github.com/AnalyticalGraphicsInc/cesium/tree/master/Documentation/Contributors/TestingGuide#run-with-webgl-stub), which makes all WebGL calls a noop and ignores test expectations that rely on reading back from WebGL. Use the web link from the main index.html or run with `npm run test-webgl-stub`. +* Fixed Geocoder autocomplete drop down visibility in Firefox [#4916](https://github.com/AnalyticalGraphicsInc/cesium/issues/4916) ### 1.29 - 2017-01-02 From 86a6128f24eeb81de9ba7e1257308fc26ea9d9a4 Mon Sep 17 00:00:00 2001 From: Hannah Date: Mon, 30 Jan 2017 14:41:40 -0500 Subject: [PATCH 3/6] Update CHANGES.md --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 651aad45773e..ea4205304e13 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -37,7 +37,7 @@ Change Log * Transparent parts of billboards, labels, and points no longer overwrite parts of the scene behind them. [#4886](https://github.com/AnalyticalGraphicsInc/cesium/pull/4886) * Added `blendOption` property to `BillboardCollection`, `LabelCollection`, and `PointPrimitiveCollection`. The default is `BlendOption.OPAQUE_AND_TRANSLUCENT`; however, if all billboards, labels, or points are either completely opaque or completely translucent, `blendOption` can be changed to `BlendOption.OPAQUE` or `BlendOption.TRANSLUCENT`, respectively, to increase performance by up to 2x. * Added the ability to run the unit tests with a [WebGL Stub](https://github.com/AnalyticalGraphicsInc/cesium/tree/master/Documentation/Contributors/TestingGuide#run-with-webgl-stub), which makes all WebGL calls a noop and ignores test expectations that rely on reading back from WebGL. Use the web link from the main index.html or run with `npm run test-webgl-stub`. -* Fixed Geocoder autocomplete drop down visibility in Firefox [#4916](https://github.com/AnalyticalGraphicsInc/cesium/issues/4916) +* Fixed `Geocoder` autocomplete drop down visibility in Firefox [#4916](https://github.com/AnalyticalGraphicsInc/cesium/issues/4916) ### 1.29 - 2017-01-02 From af666c165393efbe82fe7b22c5560122712ffdc7 Mon Sep 17 00:00:00 2001 From: Rachel Hwang Date: Mon, 30 Jan 2017 14:42:30 -0500 Subject: [PATCH 4/6] Replacing developerError with Check in polygonGeometry --- Source/Core/PolygonGeometry.js | 25 +++++++++---------------- Source/Core/PolygonOutlineGeometry.js | 24 +++++++++--------------- 2 files changed, 18 insertions(+), 31 deletions(-) diff --git a/Source/Core/PolygonGeometry.js b/Source/Core/PolygonGeometry.js index 1eb5e667d245..4526b34ebbcd 100644 --- a/Source/Core/PolygonGeometry.js +++ b/Source/Core/PolygonGeometry.js @@ -5,6 +5,7 @@ define([ './Cartesian2', './Cartesian3', './Cartographic', + './Check', './ComponentDatatype', './defaultValue', './defined', @@ -31,6 +32,7 @@ define([ Cartesian2, Cartesian3, Cartographic, + Check, ComponentDatatype, defaultValue, defined, @@ -556,9 +558,8 @@ define([ */ function PolygonGeometry(options) { //>>includeStart('debug', pragmas.debug); - if (!defined(options) || !defined(options.polygonHierarchy)) { - throw new DeveloperError('options.polygonHierarchy is required.'); - } + Check.typeOf.object('options', options); + Check.typeOf.object('options.polygonHierarchy'); if (defined(options.perPositionHeight) && options.perPositionHeight && defined(options.height)) { throw new DeveloperError('Cannot use both options.perPositionHeight and options.height'); } @@ -623,7 +624,7 @@ define([ * @param {Number} [options.height=0.0] The height of the polygon. * @param {Number} [options.extrudedHeight] The height of the polygon extrusion. * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed. - * @param {Number} [options.stRotation=0.0] The rotation of the texture coordiantes, in radians. A positive rotation is counter-clockwise. + * @param {Number} [options.stRotation=0.0] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise. * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference. * @param {Number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer. * @param {Boolean} [options.perPositionHeight=false] Use the height of options.positions for each position instead of using options.height to determine the height. @@ -651,9 +652,7 @@ define([ options = defaultValue(options, defaultValue.EMPTY_OBJECT); //>>includeStart('debug', pragmas.debug); - if (!defined(options.positions)) { - throw new DeveloperError('options.positions is required.'); - } + Check.typeOf.object('options.positions', options.positions); //>>includeEnd('debug'); var newOptions = { @@ -684,12 +683,8 @@ define([ */ PolygonGeometry.pack = function(value, array, startingIndex) { //>>includeStart('debug', pragmas.debug); - if (!defined(value)) { - throw new DeveloperError('value is required'); - } - if (!defined(array)) { - throw new DeveloperError('array is required'); - } + Check.typeOf.object('value', value); + Check.defined('array', array); //>>includeEnd('debug'); startingIndex = defaultValue(startingIndex, 0); @@ -737,9 +732,7 @@ define([ */ PolygonGeometry.unpack = function(array, startingIndex, result) { //>>includeStart('debug', pragmas.debug); - if (!defined(array)) { - throw new DeveloperError('array is required'); - } + Check.defined('array', array); //>>includeEnd('debug'); startingIndex = defaultValue(startingIndex, 0); diff --git a/Source/Core/PolygonOutlineGeometry.js b/Source/Core/PolygonOutlineGeometry.js index 1a7ad97bfc88..80b85896de1d 100644 --- a/Source/Core/PolygonOutlineGeometry.js +++ b/Source/Core/PolygonOutlineGeometry.js @@ -3,6 +3,7 @@ define([ './arrayRemoveDuplicates', './BoundingSphere', './Cartesian3', + './Check', './ComponentDatatype', './defaultValue', './defined', @@ -25,6 +26,7 @@ define([ arrayRemoveDuplicates, BoundingSphere, Cartesian3, + Check, ComponentDatatype, defaultValue, defined, @@ -286,9 +288,9 @@ define([ */ function PolygonOutlineGeometry(options) { //>>includeStart('debug', pragmas.debug); - if (!defined(options) || !defined(options.polygonHierarchy)) { - throw new DeveloperError('options.polygonHierarchy is required.'); - } + Check.typeOf.object('options', options); + Check.typeOf.object('options.polygonHierarchy'); + if (defined(options.perPositionHeight) && options.perPositionHeight && defined(options.height)) { throw new DeveloperError('Cannot use both options.perPositionHeight and options.height'); } @@ -335,12 +337,8 @@ define([ */ PolygonOutlineGeometry.pack = function(value, array, startingIndex) { //>>includeStart('debug', pragmas.debug); - if (!defined(value)) { - throw new DeveloperError('value is required'); - } - if (!defined(array)) { - throw new DeveloperError('array is required'); - } + Check.typeOf.object('value', value); + Check.defined('array', array); //>>includeEnd('debug'); startingIndex = defaultValue(startingIndex, 0); @@ -375,9 +373,7 @@ define([ */ PolygonOutlineGeometry.unpack = function(array, startingIndex, result) { //>>includeStart('debug', pragmas.debug); - if (!defined(array)) { - throw new DeveloperError('array is required'); - } + Check.defined('array', array); //>>includeEnd('debug'); startingIndex = defaultValue(startingIndex, 0); @@ -444,9 +440,7 @@ define([ options = defaultValue(options, defaultValue.EMPTY_OBJECT); //>>includeStart('debug', pragmas.debug); - if (!defined(options.positions)) { - throw new DeveloperError('options.positions is required.'); - } + Check.typeOf.object('options.positions', options.positions); //>>includeEnd('debug'); var newOptions = { From e56141f4857f32c2ca59f559b60240dbf09e811f Mon Sep 17 00:00:00 2001 From: Rachel Hwang Date: Mon, 30 Jan 2017 15:06:02 -0500 Subject: [PATCH 5/6] fix typo --- Source/Core/PolygonGeometry.js | 2 +- Source/Core/PolygonOutlineGeometry.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/PolygonGeometry.js b/Source/Core/PolygonGeometry.js index 4526b34ebbcd..479a6e5ac329 100644 --- a/Source/Core/PolygonGeometry.js +++ b/Source/Core/PolygonGeometry.js @@ -559,7 +559,7 @@ define([ function PolygonGeometry(options) { //>>includeStart('debug', pragmas.debug); Check.typeOf.object('options', options); - Check.typeOf.object('options.polygonHierarchy'); + Check.typeOf.object('options.polygonHierarchy', options.polygonHierarchy); if (defined(options.perPositionHeight) && options.perPositionHeight && defined(options.height)) { throw new DeveloperError('Cannot use both options.perPositionHeight and options.height'); } diff --git a/Source/Core/PolygonOutlineGeometry.js b/Source/Core/PolygonOutlineGeometry.js index 80b85896de1d..f24eee42c43f 100644 --- a/Source/Core/PolygonOutlineGeometry.js +++ b/Source/Core/PolygonOutlineGeometry.js @@ -289,7 +289,7 @@ define([ function PolygonOutlineGeometry(options) { //>>includeStart('debug', pragmas.debug); Check.typeOf.object('options', options); - Check.typeOf.object('options.polygonHierarchy'); + Check.typeOf.object('options.polygonHierarchy', options.polygonHierarchy); if (defined(options.perPositionHeight) && options.perPositionHeight && defined(options.height)) { throw new DeveloperError('Cannot use both options.perPositionHeight and options.height'); From ae465510fdf4c4e7cdc9d580ff3f3b22c7df8abc Mon Sep 17 00:00:00 2001 From: Rachel Hwang Date: Mon, 30 Jan 2017 16:04:07 -0500 Subject: [PATCH 6/6] fixing array check to use defined --- Source/Core/PolygonGeometry.js | 2 +- Source/Core/PolygonOutlineGeometry.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/PolygonGeometry.js b/Source/Core/PolygonGeometry.js index 479a6e5ac329..575e122cb7d2 100644 --- a/Source/Core/PolygonGeometry.js +++ b/Source/Core/PolygonGeometry.js @@ -652,7 +652,7 @@ define([ options = defaultValue(options, defaultValue.EMPTY_OBJECT); //>>includeStart('debug', pragmas.debug); - Check.typeOf.object('options.positions', options.positions); + Check.defined('options.positions', options.positions); //>>includeEnd('debug'); var newOptions = { diff --git a/Source/Core/PolygonOutlineGeometry.js b/Source/Core/PolygonOutlineGeometry.js index f24eee42c43f..f33a77983a40 100644 --- a/Source/Core/PolygonOutlineGeometry.js +++ b/Source/Core/PolygonOutlineGeometry.js @@ -440,7 +440,7 @@ define([ options = defaultValue(options, defaultValue.EMPTY_OBJECT); //>>includeStart('debug', pragmas.debug); - Check.typeOf.object('options.positions', options.positions); + Check.defined('options.positions', options.positions); //>>includeEnd('debug'); var newOptions = {