Skip to content

Commit

Permalink
Fix #1292 markers: rotation lost when updating marker
Browse files Browse the repository at this point in the history
  • Loading branch information
mistic100 committed Apr 22, 2024
1 parent 962331f commit b4ddb0d
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions packages/markers-plugin/src/markers/Marker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,11 @@ export abstract class Marker {
this.config.opacity = 1;
}

this.config.rotation = 0;
if (!utils.isNil(config.rotation)) {
try {
this.config.rotation = utils.parseAngle(config.rotation);
} catch (e) {
utils.logWarn((e as PSVError).message);
}
try {
this.config.rotation = utils.parseAngle(this.config.rotation ?? 0);
} catch (e) {
utils.logWarn((e as PSVError).message);
this.config.rotation = 0;
}

this.state.anchor = utils.parsePoint(this.config.anchor);
Expand Down

0 comments on commit b4ddb0d

Please sign in to comment.