Merge pull request #5599 from ahocevar/subpixel-center
Allow subpixel center on view
This commit is contained in:
+1
-5
@@ -439,11 +439,7 @@ ol.View.prototype.getState = function() {
|
|||||||
var resolution = /** @type {number} */ (this.getResolution());
|
var resolution = /** @type {number} */ (this.getResolution());
|
||||||
var rotation = this.getRotation();
|
var rotation = this.getRotation();
|
||||||
return /** @type {olx.ViewState} */ ({
|
return /** @type {olx.ViewState} */ ({
|
||||||
// Snap center to closest pixel
|
center: center.slice(),
|
||||||
center: [
|
|
||||||
Math.round(center[0] / resolution) * resolution,
|
|
||||||
Math.round(center[1] / resolution) * resolution
|
|
||||||
],
|
|
||||||
projection: projection !== undefined ? projection : null,
|
projection: projection !== undefined ? projection : null,
|
||||||
resolution: resolution,
|
resolution: resolution,
|
||||||
rotation: rotation
|
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