From eb7041c71d6ccb9278621b90ea75452454281b26 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Thu, 22 Jan 2015 16:52:09 +0100 Subject: [PATCH 1/4] Simplify ternary operator condition --- src/ol/map.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ol/map.js b/src/ol/map.js index 1e4996babe..c353275e55 100644 --- a/src/ol/map.js +++ b/src/ol/map.js @@ -944,13 +944,11 @@ ol.Map.prototype.handlePostRender = function() { if (!goog.isNull(frameState)) { var hints = frameState.viewHints; if (hints[ol.ViewHint.ANIMATING]) { - maxTotalLoading = this.loadTilesWhileAnimating_ === true ? - 8 : 0; + maxTotalLoading = this.loadTilesWhileAnimating_ ? 8 : 0; maxNewLoads = 2; } if (hints[ol.ViewHint.INTERACTING]) { - maxTotalLoading = this.loadTilesWhileInteracting_ === true ? - 8 : 0; + maxTotalLoading = this.loadTilesWhileInteracting_ ? 8 : 0; maxNewLoads = 2; } tileSourceCount = goog.object.getCount(frameState.wantedTiles); From 72b21822193a490c210e77bbdad1b3fe6ce96f73 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Mon, 26 Jan 2015 09:51:40 +0100 Subject: [PATCH 2/4] Add missing projection property in olx.ViewState --- externs/olx.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/externs/olx.js b/externs/olx.js index a722852e4a..2e8b833ede 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -6523,6 +6523,13 @@ olx.ViewState; olx.ViewState.prototype.center; +/** + * @type {ol.proj.Projection} + * @api + */ +olx.ViewState.prototype.projection; + + /** * @type {number} * @api From 98f7b5f1867fd47783b0364167563832b5c538c2 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Mon, 26 Jan 2015 10:20:04 +0100 Subject: [PATCH 3/4] Mark projection property as constant --- src/ol/view.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ol/view.js b/src/ol/view.js index 9544521f66..fad56ddd13 100644 --- a/src/ol/view.js +++ b/src/ol/view.js @@ -115,6 +115,7 @@ ol.View = function(opt_options) { /** * @private + * @const * @type {ol.proj.Projection} */ this.projection_ = ol.proj.createProjection(options.projection, 'EPSG:3857'); From 7885ad6ae76634c0425f9a7170e4707b37c96fe7 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Mon, 26 Jan 2015 10:33:00 +0100 Subject: [PATCH 4/4] Remove unnecessary newlines --- src/ol/interaction/pinchzoominteraction.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ol/interaction/pinchzoominteraction.js b/src/ol/interaction/pinchzoominteraction.js index dbe9fff841..75180da053 100644 --- a/src/ol/interaction/pinchzoominteraction.js +++ b/src/ol/interaction/pinchzoominteraction.js @@ -108,8 +108,7 @@ ol.interaction.PinchZoom.handleDragEvent_ = function(mapBrowserEvent) { * @this {ol.interaction.PinchZoom} * @private */ -ol.interaction.PinchZoom.handleUpEvent_ = - function(mapBrowserEvent) { +ol.interaction.PinchZoom.handleUpEvent_ = function(mapBrowserEvent) { if (this.targetPointers.length < 2) { var map = mapBrowserEvent.map; var view = map.getView(); @@ -134,8 +133,7 @@ ol.interaction.PinchZoom.handleUpEvent_ = * @this {ol.interaction.PinchZoom} * @private */ -ol.interaction.PinchZoom.handleDownEvent_ = - function(mapBrowserEvent) { +ol.interaction.PinchZoom.handleDownEvent_ = function(mapBrowserEvent) { if (this.targetPointers.length >= 2) { var map = mapBrowserEvent.map; this.anchor_ = null;