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