From bec1365584d25664196907302aeb76025e099449 Mon Sep 17 00:00:00 2001 From: Tim Deubler Date: Wed, 24 Jul 2024 19:33:29 +0200 Subject: [PATCH] changed expression id generation Signed-off-by: Tim Deubler --- packages/common/src/Expressions/Expression.ts | 6 +++--- .../display/src/displays/webgl/buffer/FeatureFactory.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/common/src/Expressions/Expression.ts b/packages/common/src/Expressions/Expression.ts index d7ecb3896..7b2c2b4cb 100644 --- a/packages/common/src/Expressions/Expression.ts +++ b/packages/common/src/Expressions/Expression.ts @@ -37,7 +37,7 @@ let expId = 0; export abstract class Expression implements IExpression { static operator: string; - protected id?: string | number; + protected _id?: string | number; static isExpression(exp) { return exp instanceof Expression; @@ -109,7 +109,7 @@ export abstract class Expression implements IExpression { return env.evaluate(this, context, mode, cache); } - private getId() { - return this.id ||= ++expId; + id() { + return this._id ||= ++expId; } } diff --git a/packages/display/src/displays/webgl/buffer/FeatureFactory.ts b/packages/display/src/displays/webgl/buffer/FeatureFactory.ts index 8175645e4..b22a8d116 100644 --- a/packages/display/src/displays/webgl/buffer/FeatureFactory.ts +++ b/packages/display/src/displays/webgl/buffer/FeatureFactory.ts @@ -553,7 +553,7 @@ export class FeatureFactory { if (!strokeWidth) continue; if (isDynamicProperty(strokeWidth)) { - widthId = strokeWidth.getId(); + widthId = (strokeWidth as Expression).id(); } else { [strokeWidth, sizeUnit] = parseSizeValue(strokeWidth); widthId = strokeWidth;