Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(geo): adjustments for style modal layer color picker #1681

Merged
merged 2 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion packages/geo/src/lib/draw/draw/draw.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ import {
} from '@angular/forms';
import { MatBadgeModule } from '@angular/material/badge';
import { MatButtonModule } from '@angular/material/button';
import { MatButtonToggleModule } from '@angular/material/button-toggle';
import {
MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS,
MatButtonToggleDefaultOptions,
MatButtonToggleModule
} from '@angular/material/button-toggle';
import { MatOptionModule } from '@angular/material/core';
import { MatDialog } from '@angular/material/dialog';
import { MatDividerModule } from '@angular/material/divider';
Expand Down Expand Up @@ -147,6 +151,14 @@ import { DrawShorcutsComponent } from './draw-shorcuts.component';
MatBadgeModule,
AsyncPipe,
IgoLanguageModule
],
providers: [
{
provide: MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS,
useValue: {
hideSingleSelectionIndicator: true
} satisfies MatButtonToggleDefaultOptions
}
]
})
export class DrawComponent implements OnInit, OnDestroy {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
<h2 mat-dialog-title class="mat-typography">
<h2 mat-dialog-title>
{{ 'igo.geo.style.styleModal' | translate }}
</h2>
<div mat-dialog-content>
<div class="edition-drawing mat-typography">
<div class="edit-colorpicker">
<form class="igo-form" [formGroup]="form">
<div
class="fill-color-picker mat-typography"
*ngIf="linestringOnly !== true"
>
<span>
<mat-icon class="stroke-palette-icon">format_color_fill</mat-icon>
{{ 'igo.geo.style.fill' | translate }}
</span>
<igo-color-picker-form-field
formControlName="fill"
(colorChange)="setLayerFillColor($event)"
></igo-color-picker-form-field>
</div>
<div class="color-picker">
<ng-container *ngIf="linestringOnly !== true">
<span>
<mat-icon class="stroke-palette-icon">format_color_fill</mat-icon>
{{ 'igo.geo.style.fill' | translate }}
</span>

<igo-color-picker-form-field
formControlName="fill"
(colorChange)="setLayerFillColor($event)"
></igo-color-picker-form-field>
</ng-container>

<div class="stroke-color-picker mat-typography">
<span>
<mat-icon class="stroke-palette-icon">border_color</mat-icon>
{{ 'igo.geo.style.stroke' | translate }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,48 +7,27 @@ h2 {
padding: 10px;
}

.fill-field,
.stroke-field {
width: 130px;
}

.fill-color-picker {
mat-icon {
position: relative;
top: 7px;
}
mat-form-field {
left: 8px;
}
}

.stroke-color-picker {
mat-icon {
position: relative;
top: 7px;
}
mat-form-field {
left: 35px;
.color-picker {
display: grid;
grid-template-columns: auto 1fr;
align-items: center;
grid-gap: 16px;
margin-bottom: 16px;

span {
display: flex;
align-items: center;

mat-icon {
margin-right: 8px;
}
}
}

.box {
width: 25px;
height: 25px;
}

.edition-drawing {
.edit-colorpicker {
padding: 10px 0;
}

.igo-input-container .mat-mdc-form-field + .mat-form-field {
margin-left: 8px;
}

.igo-form-input-box {
width: 150px;
}

button {
margin-right: 5px;
}
Loading