You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// TODO: this overrides the whole style, but should merely add measurements; most of this file can be thrown away, as it should merely add measurement styling now; also wow, that's a lot of type errors!
140
+
// TODO: this was createDrawStyle; it is createMeasureStyle now. much of the code is useless and can be removed. Proposal: Instead of overriding all styles, only inject text styles onto the existing/configured style.
136
141
exportfunctioncreateMeasureStyle(
137
-
drawMode: string,
138
142
strokeColor: string,
139
-
measureMode: MeasureMode,
143
+
measureMode: Exclude<MeasureMode,'none'>,
140
144
projection: Projection,
141
145
drawStyle?: DrawPluginOptionsLayerStyle
142
146
): Style|StyleFunction{
143
147
constdefaultFillColor='rgba(255, 255, 255, 0.5)'
144
-
if(drawMode==='Point'){
145
-
returncreatePointStyle(
146
-
strokeColor,
147
-
drawStyle?.circle?.fillColor
148
-
? drawStyle.circle.fillColor
149
-
: defaultFillColor,
150
-
drawStyle?.circle?.radius
151
-
)
152
-
}
153
148
constfillColor=drawStyle?.fill?.color
154
149
? drawStyle.fill.color
155
150
: defaultFillColor
@@ -169,23 +164,5 @@ export function createMeasureStyle(
0 commit comments