UNPKG

@geogirafe/lib-geoportal

Version:

GeoGirafe is a flexible application to build online geoportals.

56 lines (55 loc) 1.99 kB
import GirafeHTMLElement from '../../base/GirafeHTMLElement.js'; import { SelectionMode, SelectionTool } from '../../models/selection.js'; import { Draw, Interaction } from 'ol/interaction.js'; import MapComponent from '../map/component.js'; import { Style } from 'ol/style.js'; import { FeatureLike } from 'ol/Feature.js'; import IGirafePanel from '../../tools/state/igirafepanel.js'; export default class SelectionToolComponent extends GirafeHTMLElement implements IGirafePanel { protected templateUrl: string | null; protected styleUrls: string[] | null; template: () => import("uhtml").Hole; isPanelVisible: boolean; panelTitle: string; panelTogglePath: string; renderedOnce: boolean; buttons: { id: string; tool: SelectionTool; }[]; toolSelected: Element | null; selectionMode: SelectionMode; canExecuteSelect: () => boolean; get drawing(): { defaultFillColor: string; defaultStrokeColor: string; defaultStrokeWidth: number; defaultTextSize: number; defaultFont: string; defaultVertexRadius: number; defaultVertexFillColor: string; defaultVertexStrokeWidth: number; }; get map(): import("ol").Map; get mapComponent(): MapComponent; private defaultStyle; private labelStyle; styleFunction: (featureLike: FeatureLike) => Style[]; selectPoint: Interaction; selectRectangle: Draw; selectPolygon: Draw; selectFreehandPolygon: Draw; selectCircle: Draw; selectInteractions: Record<SelectionTool, Interaction | undefined>; lastSelectInteraction: Interaction | undefined; constructor(name?: string); private addSelectionHandlers; render(): void; renderComponent(): void; setTool(tool: SelectionTool | null): void; connectedCallback(): void; togglePanel(visible: boolean): void; registerEvents(): void; unregisterEvents(): void; onSelectionModeChanged(event: Event): void; }