Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
080b93f1b8 | ||
|
|
521f001944 | ||
|
|
288a284fdd | ||
|
|
a5b3da1f8a |
7
changelog/v4.3.3.md
Normal file
7
changelog/v4.3.3.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# 4.3.3
|
||||
|
||||
The v4.3.3 release reverts the fractional pixel positioning of overlays.
|
||||
|
||||
## Fixes
|
||||
|
||||
* [#7258](https://github.com/openlayers/openlayers/pull/7258) - Revert changes made in #7098 ([@ahocevar](https://github.com/ahocevar))
|
||||
7
changelog/v4.3.4.md
Normal file
7
changelog/v4.3.4.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# 4.3.4
|
||||
|
||||
The v4.3.4 release includes a fix for Safari on iOS 11.
|
||||
|
||||
## Fixes
|
||||
|
||||
* [#7285](https://github.com/openlayers/openlayers/pull/7285) - Convert pointerId to string for object lookups ([@tschaub](https://github.com/tschaub))
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "openlayers",
|
||||
"version": "4.3.2",
|
||||
"version": "4.3.4",
|
||||
"description": "Build tools and sources for developing OpenLayers based mapping applications",
|
||||
"keywords": [
|
||||
"map",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ol",
|
||||
"version": "4.3.2",
|
||||
"version": "4.3.4",
|
||||
"description": "OpenLayers as ES2015 modules",
|
||||
"main": "index.js",
|
||||
"module": "index.js",
|
||||
|
||||
@@ -69,7 +69,7 @@ ol.interaction.Pointer = function(opt_options) {
|
||||
this.handlingDownUpSequence = false;
|
||||
|
||||
/**
|
||||
* @type {Object.<number, ol.pointer.PointerEvent>}
|
||||
* @type {Object.<string, ol.pointer.PointerEvent>}
|
||||
* @private
|
||||
*/
|
||||
this.trackedPointers_ = {};
|
||||
@@ -123,14 +123,15 @@ ol.interaction.Pointer.prototype.updateTrackedPointers_ = function(mapBrowserEve
|
||||
if (this.isPointerDraggingEvent_(mapBrowserEvent)) {
|
||||
var event = mapBrowserEvent.pointerEvent;
|
||||
|
||||
var id = event.pointerId.toString();
|
||||
if (mapBrowserEvent.type == ol.MapBrowserEventType.POINTERUP) {
|
||||
delete this.trackedPointers_[event.pointerId];
|
||||
delete this.trackedPointers_[id];
|
||||
} else if (mapBrowserEvent.type ==
|
||||
ol.MapBrowserEventType.POINTERDOWN) {
|
||||
this.trackedPointers_[event.pointerId] = event;
|
||||
} else if (event.pointerId in this.trackedPointers_) {
|
||||
this.trackedPointers_[id] = event;
|
||||
} else if (id in this.trackedPointers_) {
|
||||
// update only when there was a pointerdown event for this pointer
|
||||
this.trackedPointers_[event.pointerId] = event;
|
||||
this.trackedPointers_[id] = event;
|
||||
}
|
||||
this.targetPointers = ol.obj.getValues(this.trackedPointers_);
|
||||
}
|
||||
|
||||
@@ -475,7 +475,7 @@ ol.Overlay.prototype.updateRenderedPosition = function(pixel, mapSize) {
|
||||
if (this.rendered_.left_ !== '') {
|
||||
this.rendered_.left_ = style.left = '';
|
||||
}
|
||||
var right = (mapSize[0] - pixel[0] - offsetX) + 'px';
|
||||
var right = Math.round(mapSize[0] - pixel[0] - offsetX) + 'px';
|
||||
if (this.rendered_.right_ != right) {
|
||||
this.rendered_.right_ = style.right = right;
|
||||
}
|
||||
@@ -488,7 +488,7 @@ ol.Overlay.prototype.updateRenderedPosition = function(pixel, mapSize) {
|
||||
positioning == ol.OverlayPositioning.TOP_CENTER) {
|
||||
offsetX -= this.element_.offsetWidth / 2;
|
||||
}
|
||||
var left = (pixel[0] + offsetX) + 'px';
|
||||
var left = Math.round(pixel[0] + offsetX) + 'px';
|
||||
if (this.rendered_.left_ != left) {
|
||||
this.rendered_.left_ = style.left = left;
|
||||
}
|
||||
@@ -499,7 +499,7 @@ ol.Overlay.prototype.updateRenderedPosition = function(pixel, mapSize) {
|
||||
if (this.rendered_.top_ !== '') {
|
||||
this.rendered_.top_ = style.top = '';
|
||||
}
|
||||
var bottom = (mapSize[1] - pixel[1] - offsetY) + 'px';
|
||||
var bottom = Math.round(mapSize[1] - pixel[1] - offsetY) + 'px';
|
||||
if (this.rendered_.bottom_ != bottom) {
|
||||
this.rendered_.bottom_ = style.bottom = bottom;
|
||||
}
|
||||
@@ -512,7 +512,7 @@ ol.Overlay.prototype.updateRenderedPosition = function(pixel, mapSize) {
|
||||
positioning == ol.OverlayPositioning.CENTER_RIGHT) {
|
||||
offsetY -= this.element_.offsetHeight / 2;
|
||||
}
|
||||
var top = (pixel[1] + offsetY) + 'px';
|
||||
var top = Math.round(pixel[1] + offsetY) + 'px';
|
||||
if (this.rendered_.top_ != top) {
|
||||
this.rendered_.top_ = style.top = top;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user