Allow subpixel center on view
This commit is contained in:
@@ -439,11 +439,7 @@ ol.View.prototype.getState = function() {
|
||||
var resolution = /** @type {number} */ (this.getResolution());
|
||||
var rotation = this.getRotation();
|
||||
return /** @type {olx.ViewState} */ ({
|
||||
// Snap center to closest pixel
|
||||
center: [
|
||||
Math.round(center[0] / resolution) * resolution,
|
||||
Math.round(center[1] / resolution) * resolution
|
||||
],
|
||||
center: center.slice(),
|
||||
projection: projection !== undefined ? projection : null,
|
||||
resolution: resolution,
|
||||
rotation: rotation
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 3.6 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.6 KiB |
Reference in New Issue
Block a user