Rename rotateWithMap to rotateWithView
This commit is contained in:
@@ -132,7 +132,7 @@ ol.render.canvas.Immediate =
|
||||
* @private
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.imageRotateWithMap_ = false;
|
||||
this.imageRotateWithView_ = false;
|
||||
|
||||
/**
|
||||
* @private
|
||||
@@ -232,7 +232,7 @@ ol.render.canvas.Immediate.prototype.drawImages_ =
|
||||
context.globalAlpha = alpha * this.imageOpacity_;
|
||||
}
|
||||
var rotation = this.imageRotation_;
|
||||
if (this.imageRotateWithMap_) {
|
||||
if (this.imageRotateWithView_) {
|
||||
rotation += this.viewRotation_;
|
||||
}
|
||||
var i, ii;
|
||||
@@ -798,7 +798,7 @@ ol.render.canvas.Immediate.prototype.setImageStyle = function(imageStyle) {
|
||||
// FIXME pixel ratio
|
||||
var imageImage = imageStyle.getImage(1);
|
||||
var imageOpacity = imageStyle.getOpacity();
|
||||
var imageRotateWithMap = imageStyle.getRotateWithMap();
|
||||
var imageRotateWithView = imageStyle.getRotateWithView();
|
||||
var imageRotation = imageStyle.getRotation();
|
||||
var imageScale = imageStyle.getScale();
|
||||
var imageSize = imageStyle.getSize();
|
||||
@@ -811,8 +811,8 @@ ol.render.canvas.Immediate.prototype.setImageStyle = function(imageStyle) {
|
||||
this.imageHeight_ = imageSize[1];
|
||||
this.image_ = imageImage;
|
||||
this.imageOpacity_ = goog.isDef(imageOpacity) ? imageOpacity : 1;
|
||||
this.imageRotateWithMap_ = goog.isDef(imageRotateWithMap) ?
|
||||
imageRotateWithMap : false;
|
||||
this.imageRotateWithView_ = goog.isDef(imageRotateWithView) ?
|
||||
imageRotateWithView : false;
|
||||
this.imageRotation_ = goog.isDef(imageRotation) ? imageRotation : 0;
|
||||
this.imageScale_ = goog.isDef(imageScale) ? imageScale : 1;
|
||||
this.imageSnapToPixel_ = goog.isDef(imageSnapToPixel) ?
|
||||
|
||||
@@ -231,12 +231,12 @@ ol.render.canvas.Replay.prototype.replay_ = function(
|
||||
var anchorY = /** @type {number} */ (instruction[5]) * pixelRatio;
|
||||
var height = /** @type {number} */ (instruction[6]) * pixelRatio;
|
||||
var opacity = /** @type {number} */ (instruction[7]);
|
||||
var rotateWithMap = /** @type {boolean} */ (instruction[8]);
|
||||
var rotateWithView = /** @type {boolean} */ (instruction[8]);
|
||||
var rotation = /** @type {number} */ (instruction[9]);
|
||||
var scale = /** @type {number} */ (instruction[10]);
|
||||
var snapToPixel = /** @type {boolean|undefined} */ (instruction[11]);
|
||||
var width = /** @type {number} */ (instruction[12]) * pixelRatio;
|
||||
if (rotateWithMap) {
|
||||
if (rotateWithView) {
|
||||
rotation += viewRotation;
|
||||
}
|
||||
for (; d < dd; d += 2) {
|
||||
@@ -629,7 +629,7 @@ ol.render.canvas.ImageReplay = function(tolerance) {
|
||||
* @private
|
||||
* @type {boolean|undefined}
|
||||
*/
|
||||
this.rotateWithMap_ = undefined;
|
||||
this.rotateWithView_ = undefined;
|
||||
|
||||
/**
|
||||
* @private
|
||||
@@ -686,7 +686,7 @@ ol.render.canvas.ImageReplay.prototype.drawPointGeometry =
|
||||
goog.asserts.assert(goog.isDef(this.anchorY_));
|
||||
goog.asserts.assert(goog.isDef(this.height_));
|
||||
goog.asserts.assert(goog.isDef(this.opacity_));
|
||||
goog.asserts.assert(goog.isDef(this.rotateWithMap_));
|
||||
goog.asserts.assert(goog.isDef(this.rotateWithView_));
|
||||
goog.asserts.assert(goog.isDef(this.rotation_));
|
||||
goog.asserts.assert(goog.isDef(this.scale_));
|
||||
goog.asserts.assert(goog.isDef(this.width_));
|
||||
@@ -701,7 +701,7 @@ ol.render.canvas.ImageReplay.prototype.drawPointGeometry =
|
||||
ol.render.canvas.Instruction.DRAW_IMAGE, myBegin, myEnd, this.image_,
|
||||
// Remaining arguments to DRAW_IMAGE are in alphabetical order
|
||||
this.anchorX_, this.anchorY_, this.height_, this.opacity_,
|
||||
this.rotateWithMap_, this.rotation_, this.scale_, this.snapToPixel_,
|
||||
this.rotateWithView_, this.rotation_, this.scale_, this.snapToPixel_,
|
||||
this.width_
|
||||
]);
|
||||
this.hitDetectionInstructions.push([
|
||||
@@ -709,7 +709,7 @@ ol.render.canvas.ImageReplay.prototype.drawPointGeometry =
|
||||
this.hitDetectionImage_,
|
||||
// Remaining arguments to DRAW_IMAGE are in alphabetical order
|
||||
this.anchorX_, this.anchorY_, this.height_, this.opacity_,
|
||||
this.rotateWithMap_, this.rotation_, this.scale_, this.snapToPixel_,
|
||||
this.rotateWithView_, this.rotation_, this.scale_, this.snapToPixel_,
|
||||
this.width_
|
||||
]);
|
||||
this.endGeometry(pointGeometry, data);
|
||||
@@ -728,7 +728,7 @@ ol.render.canvas.ImageReplay.prototype.drawMultiPointGeometry =
|
||||
goog.asserts.assert(goog.isDef(this.anchorY_));
|
||||
goog.asserts.assert(goog.isDef(this.height_));
|
||||
goog.asserts.assert(goog.isDef(this.opacity_));
|
||||
goog.asserts.assert(goog.isDef(this.rotateWithMap_));
|
||||
goog.asserts.assert(goog.isDef(this.rotateWithView_));
|
||||
goog.asserts.assert(goog.isDef(this.rotation_));
|
||||
goog.asserts.assert(goog.isDef(this.scale_));
|
||||
goog.asserts.assert(goog.isDef(this.width_));
|
||||
@@ -743,7 +743,7 @@ ol.render.canvas.ImageReplay.prototype.drawMultiPointGeometry =
|
||||
ol.render.canvas.Instruction.DRAW_IMAGE, myBegin, myEnd, this.image_,
|
||||
// Remaining arguments to DRAW_IMAGE are in alphabetical order
|
||||
this.anchorX_, this.anchorY_, this.height_, this.opacity_,
|
||||
this.rotateWithMap_, this.rotation_, this.scale_, this.snapToPixel_,
|
||||
this.rotateWithView_, this.rotation_, this.scale_, this.snapToPixel_,
|
||||
this.width_
|
||||
]);
|
||||
this.hitDetectionInstructions.push([
|
||||
@@ -751,7 +751,7 @@ ol.render.canvas.ImageReplay.prototype.drawMultiPointGeometry =
|
||||
this.hitDetectionImage_,
|
||||
// Remaining arguments to DRAW_IMAGE are in alphabetical order
|
||||
this.anchorX_, this.anchorY_, this.height_, this.opacity_,
|
||||
this.rotateWithMap_, this.rotation_, this.scale_, this.snapToPixel_,
|
||||
this.rotateWithView_, this.rotation_, this.scale_, this.snapToPixel_,
|
||||
this.width_
|
||||
]);
|
||||
this.endGeometry(multiPointGeometry, data);
|
||||
@@ -771,7 +771,7 @@ ol.render.canvas.ImageReplay.prototype.finish = function() {
|
||||
this.height_ = undefined;
|
||||
this.scale_ = undefined;
|
||||
this.opacity_ = undefined;
|
||||
this.rotateWithMap_ = undefined;
|
||||
this.rotateWithView_ = undefined;
|
||||
this.rotation_ = undefined;
|
||||
this.snapToPixel_ = undefined;
|
||||
this.width_ = undefined;
|
||||
@@ -797,7 +797,7 @@ ol.render.canvas.ImageReplay.prototype.setImageStyle = function(imageStyle) {
|
||||
this.image_ = image;
|
||||
this.height_ = size[1];
|
||||
this.opacity_ = imageStyle.getOpacity();
|
||||
this.rotateWithMap_ = imageStyle.getRotateWithMap();
|
||||
this.rotateWithView_ = imageStyle.getRotateWithView();
|
||||
this.rotation_ = imageStyle.getRotation();
|
||||
this.scale_ = imageStyle.getScale();
|
||||
this.snapToPixel_ = imageStyle.getSnapToPixel();
|
||||
|
||||
@@ -70,7 +70,7 @@ ol.style.Circle = function(opt_options) {
|
||||
|
||||
goog.base(this, {
|
||||
opacity: 1,
|
||||
rotateWithMap: false,
|
||||
rotateWithView: false,
|
||||
rotation: 0,
|
||||
scale: 1,
|
||||
snapToPixel: undefined
|
||||
|
||||
@@ -99,8 +99,8 @@ ol.style.Icon = function(opt_options) {
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
var rotateWithMap = goog.isDef(options.rotateWithMap) ?
|
||||
options.rotateWithMap : false;
|
||||
var rotateWithView = goog.isDef(options.rotateWithView) ?
|
||||
options.rotateWithView : false;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
@@ -117,7 +117,7 @@ ol.style.Icon = function(opt_options) {
|
||||
rotation: rotation,
|
||||
scale: scale,
|
||||
snapToPixel: undefined,
|
||||
rotateWithMap: rotateWithMap
|
||||
rotateWithView: rotateWithView
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
@@ -17,7 +17,7 @@ ol.style.ImageState = {
|
||||
|
||||
/**
|
||||
* @typedef {{opacity: number,
|
||||
* rotateWithMap: boolean,
|
||||
* rotateWithView: boolean,
|
||||
* rotation: number,
|
||||
* scale: number,
|
||||
* snapToPixel: (boolean|undefined)}}
|
||||
@@ -42,7 +42,7 @@ ol.style.Image = function(options) {
|
||||
* @private
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.rotateWithMap_ = options.rotateWithMap;
|
||||
this.rotateWithView_ = options.rotateWithView;
|
||||
|
||||
/**
|
||||
* @private
|
||||
@@ -76,8 +76,8 @@ ol.style.Image.prototype.getOpacity = function() {
|
||||
/**
|
||||
* @return {boolean} Rotate with map.
|
||||
*/
|
||||
ol.style.Image.prototype.getRotateWithMap = function() {
|
||||
return this.rotateWithMap_;
|
||||
ol.style.Image.prototype.getRotateWithView = function() {
|
||||
return this.rotateWithView_;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user