Offset for ImageStyle

This commit is contained in:
jkonieczny
2019-12-18 08:22:40 +01:00
committed by Andreas Hocevar
parent ee1b038714
commit 4c7f52c8a4
4 changed files with 28 additions and 27 deletions

View File

@@ -84,6 +84,7 @@ class Icon extends ImageStyle {
opacity: opacity,
rotation: rotation,
scale: scale,
offset: options.offset !== undefined ? options.offset : [0, 0],
rotateWithView: rotateWithView
});
@@ -172,12 +173,6 @@ class Icon extends ImageStyle {
this.iconImage_ = getIconImage(
image, /** @type {string} */ (src), imgSize, this.crossOrigin_, imageState, this.color_);
/**
* @private
* @type {Array<number>}
*/
this.offset_ = options.offset !== undefined ? options.offset : [0, 0];
/**
* @private
* @type {import("./IconOrigin.js").default}