Skip to content

Commit

Permalink
fix(cesium): Align style of cesium buttons
Browse files Browse the repository at this point in the history
Prevent clash of basemapGallery and Cesium buttons
  • Loading branch information
jmacura committed May 13, 2024
1 parent a9e7941 commit 5c199a5
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 14 deletions.
3 changes: 2 additions & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,8 @@
],
"styles": [
"node_modules/cesium/Build/Cesium/Widgets/widgets.css",
"projects/hslayers/css/hslayers-bootstrap.scss"
"projects/hslayers/css/hslayers-bootstrap.scss",
"projects/hslayers-cesium/css/hslayers-cesium.scss"
],
"scripts": [],
"customWebpackConfig": {
Expand Down
3 changes: 3 additions & 0 deletions projects/cesium-test-app/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ export class AppComponent implements OnInit {
opacity: 1,
});
this.hsConfig.update({
componentsEnabled: {
basemapGallery: true,
},
datasources: [
{
title: 'Layman',
Expand Down
27 changes: 27 additions & 0 deletions projects/hslayers-cesium/css/hslayers-cesium.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
$bs-btn-bg: white;
$bs-btn-color: #6c757d;
$bs-border-radius: 0.375rem;
$bs-btn-border-color: transparent;

.hs-cesium-container .cesium-viewer-toolbar {
position: absolute;
display: block;
top: 0.7em;
right: calc(15px + 1rem + 1rem + 2px);
}

.hs-cesium-container .cesium-button {
opacity: 0.9;
color: $bs-btn-color;
fill: $bs-btn-color;
background-color: $bs-btn-bg;
border-radius: $bs-border-radius;
border-color: $bs-btn-border-color;
box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}

.hs-cesium-container .cesium-button:hover {
background-color: $bs-btn-color;
color: $bs-btn-bg;
fill: $bs-btn-bg;
}
14 changes: 14 additions & 0 deletions projects/hslayers-cesium/src/hscesium.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.hs-cesium-container {
height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
position: absolute;
left: 0;
top: 0;
width: 100%;
margin-right: 0;
}



14 changes: 1 addition & 13 deletions projects/hslayers-cesium/src/hscesium.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,7 @@ import {takeUntilDestroyed} from '@angular/core/rxjs-interop';
@Component({
selector: 'hs-cesium',
templateUrl: './hscesium.component.html',
styles: `
.hs-cesium-container {
height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
position: absolute;
left: 0;
top: 0;
width: 100%;
margin-right: 0;
}
`,
styleUrl: './hscesium.component.scss',
})
export class HslayersCesiumComponent implements AfterViewInit {
app = 'default';
Expand Down

0 comments on commit 5c199a5

Please sign in to comment.