Add opacity property to ol.style.Image
This commit is contained in:
@@ -16,7 +16,8 @@ ol.style.ImageState = {
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {{rotation: number,
|
||||
* @typedef {{opacity: number,
|
||||
* rotation: number,
|
||||
* scale: number,
|
||||
* snapToPixel: (boolean|undefined),
|
||||
* subtractViewRotation: boolean}}
|
||||
@@ -31,6 +32,12 @@ ol.style.ImageOptions;
|
||||
*/
|
||||
ol.style.Image = function(options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {number}
|
||||
*/
|
||||
this.opacity_ = options.opacity;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {number}
|
||||
@@ -58,6 +65,14 @@ ol.style.Image = function(options) {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @return {number} Opacity.
|
||||
*/
|
||||
ol.style.Image.prototype.getOpacity = function() {
|
||||
return this.opacity_;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @return {number} Rotation.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user