Skip to content
Snippets Groups Projects

feat(vector-map): implement line scaling

Merged Miłosz Grocholewski requested to merge feat/MIN-66-line-scaling into development
2 unresolved threads

Closes MIN-66

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
207 220 });
208 221 const squareFeature = new Feature({
209 222 geometry: new MultiPolygon(polygons),
223 style: styles,
224 lineWidth: 1,
210 225 });
211 squareFeature.setStyle(styles);
226 squareFeature.setStyle(this.styleFunction.bind(this));
212 227 return squareFeature;
213 228 }
229
230 protected styleFunction(feature: FeatureLike, resolution: number): Style | Array<Style> | void {
  • 224 lineWidth: 1,
    210 225 });
    211 squareFeature.setStyle(styles);
    226 squareFeature.setStyle(this.styleFunction.bind(this));
    212 227 return squareFeature;
    213 228 }
    229
    230 protected styleFunction(feature: FeatureLike, resolution: number): Style | Array<Style> | void {
    231 const minResolution = this.mapInstance?.getView().getMinResolution();
    232 if (!minResolution) {
    233 return [];
    234 }
    235 const scale = minResolution / resolution;
    236 const style = feature.get('style');
    237 const lineWidth = feature.get('lineWidth') * scale;
    238 if (style) {
  • Konrad Przybysz approved this merge request

    approved this merge request

  • added 4 commits

    Compare with previous version

  • added 1 commit

    • 23978147 - refactor(vector-map): rename styleFunction to getStyle

    Compare with previous version

  • Miłosz Grocholewski reset approvals from @KonradAt by pushing to the branch

    reset approvals from @KonradAt by pushing to the branch

  • Miłosz Grocholewski deleted the feat/MIN-56-reaction-square branch. This merge request now targets the development branch

    deleted the feat/MIN-56-reaction-square branch. This merge request now targets the development branch

  • added 18 commits

    Compare with previous version

  • mentioned in commit 61500424

  • Please register or sign in to reply
    Loading