Image rotation in WebGL was anti-clockwise

This commit is contained in:
Thomas Chandelle
2016-11-10 17:00:50 +01:00
parent 7f0d914161
commit 9ffa103a79
2 changed files with 2 additions and 1 deletions

View File

@@ -203,7 +203,8 @@ ol.render.webgl.ImageReplay.prototype.drawCoordinates_ = function(flatCoordinate
var originX = /** @type {number} */ (this.originX_);
var originY = /** @type {number} */ (this.originY_);
var rotateWithView = this.rotateWithView_ ? 1.0 : 0.0;
var rotation = /** @type {number} */ (this.rotation_);
// this.rotation_ is anti-clockwise, but rotation is clockwise
var rotation = /** @type {number} */ (-this.rotation_);
var scale = /** @type {number} */ (this.scale_);
var width = /** @type {number} */ (this.width_);
var cos = Math.cos(rotation);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB