Icon anchors are Array.<number>
This commit is contained in:
@@ -797,7 +797,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} olx.style.IconOptions
|
* @typedef {Object} olx.style.IconOptions
|
||||||
* @property {ol.Pixel|undefined} anchor Anchor. Default value is [0.5, 0.5]
|
* @property {Array.<number>|undefined} anchor Anchor. Default value is [0.5, 0.5]
|
||||||
* (icon center).
|
* (icon center).
|
||||||
* @property {ol.style.IconAnchorUnits|undefined} anchorXUnits Units in which the anchor x value is specified.
|
* @property {ol.style.IconAnchorUnits|undefined} anchorXUnits Units in which the anchor x value is specified.
|
||||||
* A value of `'fraction'` indicates the x value is a fraction of the icon.
|
* A value of `'fraction'` indicates the x value is a fraction of the icon.
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ ol.style.Icon = function(opt_options) {
|
|||||||
options.anchorYUnits : ol.style.IconAnchorUnits.FRACTION;
|
options.anchorYUnits : ol.style.IconAnchorUnits.FRACTION;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {ol.Pixel}
|
* @type {Array.<number>}
|
||||||
*/
|
*/
|
||||||
var anchor = goog.isDef(options.anchor) ? options.anchor : [0.5, 0.5];
|
var anchor = goog.isDef(options.anchor) ? options.anchor : [0.5, 0.5];
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ ol.style.ImageState = {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {{anchor: ol.Pixel,
|
* @typedef {{anchor: Array.<number>,
|
||||||
* imageState: ol.style.ImageState,
|
* imageState: ol.style.ImageState,
|
||||||
* rotation: number,
|
* rotation: number,
|
||||||
* scale: number,
|
* scale: number,
|
||||||
@@ -42,7 +42,7 @@ ol.style.Image = function(options) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @protected
|
* @protected
|
||||||
* @type {ol.Pixel}
|
* @type {Array.<number>}
|
||||||
*/
|
*/
|
||||||
this.anchor = options.anchor;
|
this.anchor = options.anchor;
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@ ol.style.Image.prototype.dispatchChangeEvent = function() {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {ol.Pixel} Anchor.
|
* @return {Array.<number>} Anchor.
|
||||||
*/
|
*/
|
||||||
ol.style.Image.prototype.getAnchor = function() {
|
ol.style.Image.prototype.getAnchor = function() {
|
||||||
return this.anchor;
|
return this.anchor;
|
||||||
|
|||||||
Reference in New Issue
Block a user