Skip to content

Commit 41e004b

Browse files
committed
Call setStyle on style change fro vector layers
1 parent 28ba188 commit 41e004b

File tree

6 files changed

+16
-4
lines changed

6 files changed

+16
-4
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "demo-ngx-ol",
3-
"version": "20.1.1",
3+
"version": "20.1.2",
44
"scripts": {
55
"ng": "ng",
66
"start": "npm run build:lib && ng serve",

projects/ngx-ol/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@compassinformatics/ngx-ol",
3-
"version": "20.1.1",
3+
"version": "20.1.2",
44
"peerDependencies": {
55
"@angular/common": ">=18.0.0 <21.0.0",
66
"@angular/core": ">=18.0.0 <21.0.0",

projects/ngx-ol/src/lib/layers/layervector.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,9 @@ export class LayerVectorComponent extends LayerComponent implements OnInit, OnDe
5757

5858
ngOnChanges(changes: SimpleChanges) {
5959
super.ngOnChanges(changes);
60+
const { style } = changes;
61+
if (style) {
62+
this.instance.setStyle(style.currentValue);
63+
}
6064
}
6165
}

projects/ngx-ol/src/lib/layers/layervectorimage.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,9 @@ export class LayerVectorImageComponent
5353

5454
ngOnChanges(changes: SimpleChanges) {
5555
super.ngOnChanges(changes);
56+
const { style } = changes;
57+
if (style) {
58+
this.instance.setStyle(style.currentValue);
59+
}
5660
}
5761
}

projects/ngx-ol/src/lib/layers/layervectortile.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,9 @@ export class LayerVectorTileComponent extends LayerComponent implements OnInit,
4343

4444
ngOnChanges(changes: SimpleChanges) {
4545
super.ngOnChanges(changes);
46+
const { style } = changes;
47+
if (style) {
48+
this.instance.setStyle(style.currentValue);
49+
}
4650
}
4751
}

0 commit comments

Comments
 (0)