refactor offset to displacement
This commit is contained in:
committed by
Andreas Hocevar
parent
4c7f52c8a4
commit
78378f0253
@@ -10,7 +10,7 @@ import RegularShape from './RegularShape.js';
|
||||
* @property {import("./Fill.js").default} [fill] Fill style.
|
||||
* @property {number} radius Circle radius.
|
||||
* @property {import("./Stroke.js").default} [stroke] Stroke style.
|
||||
* @property {Array<number>} [offset=[0,0]] offset
|
||||
* @property {Array<number>} [displacement=[0,0]] displacement
|
||||
*/
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ class CircleStyle extends RegularShape {
|
||||
fill: options.fill,
|
||||
radius: options.radius,
|
||||
stroke: options.stroke,
|
||||
offset: options.offset !== undefined ? options.offset : [0, 0]
|
||||
displacement: options.displacement !== undefined ? options.displacement : [0, 0]
|
||||
});
|
||||
|
||||
}
|
||||
@@ -48,7 +48,7 @@ class CircleStyle extends RegularShape {
|
||||
fill: this.getFill() ? this.getFill().clone() : undefined,
|
||||
stroke: this.getStroke() ? this.getStroke().clone() : undefined,
|
||||
radius: this.getRadius(),
|
||||
offset: this.getOffset().slice()
|
||||
displacement: this.getDisplacement().slice()
|
||||
});
|
||||
style.setOpacity(this.getOpacity());
|
||||
style.setScale(this.getScale());
|
||||
|
||||
Reference in New Issue
Block a user