Skip to content

Commit

Permalink
+ Update
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesCodesUFG committed Feb 6, 2025
1 parent fd5f6ff commit db4b648
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 17 deletions.
4 changes: 2 additions & 2 deletions client/src/app/map-platform/components.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { MainComponent } from './components/main/main.component';
import { ComponentsRoutingModule } from './components-routing.module';
import { LayersSidebarComponent } from './components/layers-sidebar/layers-sidebar.component';
import { DrawAreaComponent } from './components/general-map/draw_area/draw_area.component';
import { SwipeComponent } from './components/general-map/swipe/swipe.component';
import { SwipeToolComponent } from './components/general-map/swipe-tool/swipe-tool.component';
import { DialogMessageComponent } from '@core/components/dialog-message/dialog-message.component';
import { OlMapComponent } from '@core/components/ol-map/ol-map.component';
import { GeneralMapComponent } from './components/general-map/general-map.component';
Expand Down Expand Up @@ -91,7 +91,7 @@ registerLocaleData(localePt);
AreaSidebarComponent,
GeneralMapComponent,
FileUploadComponent,
SwipeComponent,
SwipeToolComponent,
FilterComponent,
DrawAreaComponent
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ import { OlMapComponent } from '@core/components/ol-map/ol-map.component';
import { LayerService } from '@core/services/layer.service';
import BaseLayer from 'ol/layer/Base';
import { UserInfoComponent } from '@core/components/user-info-dialog/user-info-dialog.component';
import { SwipeComponent } from './swipe/swipe.component';
import { SwipeToolComponent } from './swipe-tool/swipe-tool.component';
import { DrawAreaComponent } from './draw_area/draw_area.component';

//pdfMake.vfs = pdfFonts.pdfMake.vfs;
Expand Down Expand Up @@ -128,7 +128,7 @@ export class GeneralMapComponent implements OnInit, OnDestroy, Ruler {
@ViewChild('wfsCard') wfsCard!: ElementRef;

@ViewChild(OlMapComponent) olMap!: OlMapComponent;
@ViewChild(SwipeComponent) swipeComponent!: SwipeComponent;
@ViewChild(SwipeToolComponent) swipeComponent!: SwipeToolComponent;
@ViewChild(DrawAreaComponent) drawAreaComponent!: DrawAreaComponent;

public features: any[] = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ import { LayerService } from '@core/services';

@Component({
selector: 'app-swipe',
templateUrl: './swipe.component.html',
styleUrls: ['./swipe.component.scss'],
templateUrl: './swipe-tool.component.html',
styleUrls: ['./swipe-tool.component.scss'],
})
export class SwipeComponent implements OnInit, OnDestroy {
export class SwipeToolComponent implements OnInit, OnDestroy {
@Output() handleLayersLegend: EventEmitter<any> = new EventEmitter();

private desciptorSubscription: Subscription = new Subscription();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { LocalizationService } from '@core/internationalization/localization.ser
* Interfaces imports.
*/
import { Descriptor, DescriptorLayer } from '@core/interfaces';
import { DescriptorType } from '@core/interfaces';
import { DescriptorType } from '@core/interfaces';

/**
* Services imports.
Expand All @@ -21,7 +21,9 @@ import { DescriptorService } from '../../../@core/services';
import { Subscription } from 'rxjs';

import { InputSwitchOnChangeEvent } from 'primeng/inputswitch';
import { AccordionTabCloseEvent, AccordionTabOpenEvent } from 'primeng/accordion';
import {AccordionTabCloseEvent, AccordionTabOpenEvent} from 'primeng/accordion';

const bmapKeys: string[] = ['mapbox', 'mapbox-dark', 'google', 'google-hybrid'];

@Component({
selector: 'app-options-sidebar',
Expand Down Expand Up @@ -72,7 +74,10 @@ class OptionsSidebarComponent {
}

public onAccordionTabClose(event: AccordionTabCloseEvent): void {
OptionsSidebarComponent._accordionTabExpanded = OptionsSidebarComponent._accordionTabExpanded.filter(element => element !== event.index);
OptionsSidebarComponent._accordionTabExpanded =
OptionsSidebarComponent._accordionTabExpanded.filter(
(element) => element !== event.index
);
}

/**
Expand Down Expand Up @@ -100,13 +105,6 @@ class OptionsSidebarComponent {
private setBasemaps(descriptor: Descriptor): void {
if (this.bmaps.length != 0) return;

const bmapKeys: string[] = [
'mapbox',
'mapbox-dark',
'google',
'google-hybrid',
];

descriptor.basemaps.forEach((bmap: DescriptorLayer) => {
bmap.types.forEach((type: DescriptorType) => {
if (bmapKeys.includes(type.valueType)) {
Expand All @@ -129,6 +127,7 @@ class OptionsSidebarComponent {
public onChangeLimit(limit: any, event: InputSwitchOnChangeEvent): void {
this.limits.forEach((element: any) => {
if (element.key === limit.key) return;

element.checked = false;
});

Expand All @@ -144,6 +143,7 @@ class OptionsSidebarComponent {
public onChangeBmap(bmap: any, event: InputSwitchOnChangeEvent): void {
this.bmaps.forEach((element: any) => {
if (element.key === bmap.key) return;

element.checked = false;
});

Expand All @@ -159,6 +159,7 @@ class OptionsSidebarComponent {
public onChangeOption(key: string, event: InputSwitchOnChangeEvent): void {
this.options.forEach((option: any) => {
if (option.key === key) return;

option.checked = false;
});
}
Expand Down

0 comments on commit db4b648

Please sign in to comment.