Set snapToPixel defaut value to true
This commit is contained in:
@@ -892,7 +892,6 @@ ol.render.canvas.Immediate.prototype.setImageStyle = function(imageStyle) {
|
||||
var imageRotation = imageStyle.getRotation();
|
||||
var imageScale = imageStyle.getScale();
|
||||
var imageSize = imageStyle.getSize();
|
||||
var imageSnapToPixel = imageStyle.getSnapToPixel();
|
||||
goog.asserts.assert(!goog.isNull(imageAnchor));
|
||||
goog.asserts.assert(!goog.isNull(imageImage));
|
||||
goog.asserts.assert(!goog.isNull(imageOrigin));
|
||||
@@ -908,8 +907,7 @@ ol.render.canvas.Immediate.prototype.setImageStyle = function(imageStyle) {
|
||||
imageRotateWithView : false;
|
||||
this.imageRotation_ = goog.isDef(imageRotation) ? imageRotation : 0;
|
||||
this.imageScale_ = goog.isDef(imageScale) ? imageScale : 1;
|
||||
this.imageSnapToPixel_ = goog.isDef(imageSnapToPixel) ?
|
||||
imageSnapToPixel : false;
|
||||
this.imageSnapToPixel_ = imageStyle.getSnapToPixel();
|
||||
this.imageWidth_ = imageSize[0];
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// FIXME decide default snapToPixel behaviour
|
||||
// FIXME add option to apply snapToPixel to all coordinates?
|
||||
// FIXME can eliminate empty set styles and strokes (when all geoms skipped)
|
||||
|
||||
@@ -291,7 +290,7 @@ ol.render.canvas.Replay.prototype.replay_ = function(
|
||||
var rotateWithView = /** @type {boolean} */ (instruction[10]);
|
||||
var rotation = /** @type {number} */ (instruction[11]);
|
||||
var scale = /** @type {number} */ (instruction[12]);
|
||||
var snapToPixel = /** @type {boolean|undefined} */ (instruction[13]);
|
||||
var snapToPixel = /** @type {boolean} */ (instruction[13]);
|
||||
var width = /** @type {number} */ (instruction[14]) * pixelRatio;
|
||||
if (rotateWithView) {
|
||||
rotation += viewRotation;
|
||||
|
||||
Reference in New Issue
Block a user