Skip to content

Commit

Permalink
refactor: use existing vars for subpaths
Browse files Browse the repository at this point in the history
  • Loading branch information
jansule committed Feb 12, 2024
1 parent 260c80d commit 9c455a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SldStyleParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ export class SldStyleParser implements StyleParser<string> {
const linePlacement = get(placement, 'LinePlacement');
if (!isNil(pointPlacement)) {
textSymbolizer.placement = 'point';
const displacement = get(placement, 'PointPlacement.Displacement');
const displacement = get(pointPlacement, 'Displacement');
if (!isNil(displacement)) {
const x = get(displacement, 'DisplacementX.#text');
const y = get(displacement, 'DisplacementY.#text');
Expand All @@ -716,7 +716,7 @@ export class SldStyleParser implements StyleParser<string> {
Number.isFinite(y) ? numberExpression(y) : 0,
];
}
const rotation = get(placement, 'PointPlacement.Rotation.#text');
const rotation = get(pointPlacement, 'Rotation.#text');
if (!isNil(rotation)) {
textSymbolizer.rotate = numberExpression(rotation);
}
Expand Down

0 comments on commit 9c455a6

Please sign in to comment.