-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: show button for settings if layer has action; closes #135 * fix: Show layer expand icon only when the layer has some things to expand * refactor: move style switcher into settings tab * feat: Allow dynamic components for layer.description * feat: Allow dynamic components for layer.description - set input * feat: adjust types to allow Dynamic components for layer description * fix: Do not change the layer object binding in layerentry * refactor: add example for layer.description as component * feat: use inputs.description if possible to generate abstract from dynamic component * fix: Show layer expand icon if filtertype not Baselayers * fix: remove right border on tabsbody for layers inside a group * fix: Do not change the group object binding in * fix: toggle group tabs and show all settings * feat: Allow Dynamic components for Group description * feat: Allow legend on LayerGroup #138 * refactor: add example legend and description components for group * fix: style for group tabsbody and actions button position * refactor: set input on layer IDynamicComponent - no object change needed after c6c437e
- Loading branch information
Showing
25 changed files
with
412 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...cts/demo-maps/src/app/components/example-group-legend/example-group-legend.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<div class="wrapper"> | ||
<!-- title="Show full Image" target="_blank" --> | ||
<img [src]="legendImages[0].url" class="stacked" width="256" height="256" /> | ||
<img [src]="legendImages[1].url" usemap="#legendmap" /> | ||
|
||
|
||
<map name="legendmap"> | ||
<area shape="rect" coords="0,0,256,128" alt="top" title="Show full Image overlay" [href]="legendImages[0].url" target="_blank"> | ||
<area shape="rect" coords="0,128,256,256" alt="below" title="Show full Image base" [href]="legendImages[1].url" target="_blank"> | ||
</map> | ||
</div> |
8 changes: 8 additions & 0 deletions
8
...cts/demo-maps/src/app/components/example-group-legend/example-group-legend.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.wrapper { | ||
position: relative; | ||
|
||
.stacked { | ||
position: absolute; | ||
pointer-events: none; | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
.../demo-maps/src/app/components/example-group-legend/example-group-legend.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { ExampleGroupLegendComponent } from './example-group-legend.component'; | ||
|
||
describe('ExampleGroupLegendComponent', () => { | ||
let component: ExampleGroupLegendComponent; | ||
let fixture: ComponentFixture<ExampleGroupLegendComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [ ExampleGroupLegendComponent ] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(ExampleGroupLegendComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
18 changes: 18 additions & 0 deletions
18
projects/demo-maps/src/app/components/example-group-legend/example-group-legend.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Component, Input, OnInit } from '@angular/core'; | ||
import { LayerGroup } from '@dlr-eoc/services-layers'; | ||
|
||
@Component({ | ||
selector: 'app-example-group-legend', | ||
templateUrl: './example-group-legend.component.html', | ||
styleUrls: ['./example-group-legend.component.scss'] | ||
}) | ||
export class ExampleGroupLegendComponent implements OnInit { | ||
@Input() group: LayerGroup; | ||
legendImages = []; | ||
constructor() { } | ||
|
||
ngOnInit(): void { | ||
this.legendImages = this.group.layers.filter(l => l.legendImg && typeof l.legendImg === 'string').map(i => { return { url: i.legendImg } }).reverse(); | ||
} | ||
|
||
} |
18 changes: 13 additions & 5 deletions
18
projects/demo-maps/src/app/components/example-layer-action/example-layer-action.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
...aps/src/app/components/example-layer-description/example-layer-description.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<div class="custom-description"> | ||
{{this.description}}. | ||
<p> | ||
This description was styled with a dynamic component as the layer.description. | ||
</p> | ||
|
||
<p> | ||
Keep in mind that this breaks @dlr-eoc/services-ogc generateResourceFromLayer() for this layer when exporting a | ||
<b>IOwsContext</b>. | ||
</p> | ||
|
||
</div> |
9 changes: 9 additions & 0 deletions
9
...aps/src/app/components/example-layer-description/example-layer-description.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.custom-description { | ||
word-break: normal; | ||
color: #0072a3; | ||
|
||
p { | ||
word-break: normal; | ||
color: rgb(255, 165, 46); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
.../src/app/components/example-layer-description/example-layer-description.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { ExampleLayerDescriptionComponent } from './example-layer-description.component'; | ||
|
||
describe('ExampleLayerDescriptionComponent', () => { | ||
let component: ExampleLayerDescriptionComponent; | ||
let fixture: ComponentFixture<ExampleLayerDescriptionComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [ ExampleLayerDescriptionComponent ] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(ExampleLayerDescriptionComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
16 changes: 16 additions & 0 deletions
16
...-maps/src/app/components/example-layer-description/example-layer-description.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Component, Input, OnInit } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-example-layer-description', | ||
templateUrl: './example-layer-description.component.html', | ||
styleUrls: ['./example-layer-description.component.scss'] | ||
}) | ||
export class ExampleLayerDescriptionComponent implements OnInit { | ||
@Input() layer; | ||
@Input() description; | ||
constructor() { } | ||
|
||
ngOnInit(): void { | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.