UNPKG

leaflet-styleeditor-minified

Version:

Edit the style of features drawn within Leaflet.

43 lines (42 loc) 1.63 kB
import { Map } from "leaflet"; /** * Helper functions used throuhgout the project */ export declare class UtilOptions { defaultColor: any; styleEditorEventPrefix: string; } export declare class Util { private static instance; map: Map; options: UtilOptions; constructor(map: any, options: any); static createInstance(map: any, options: any): void; static getInstance(): Util; fireEvent(eventName: string, element: any): void; /** fire an event if Leaflet.StyleEditor changed something */ fireChangeEvent(element: any): void; /** hide the given element */ hideElement(element: HTMLElement): void; /** convert rgb to hex of a color * @param {string} rgb - rgb representation of the color * @param {boolean} noHash - define if return value should not include hash */ rgbToHex(rgb: string, noHash?: Boolean): any; /** get element selected to be styled */ getCurrentElement(): void; /** set which element is selected to be styled */ setCurrentElement(currentElement: any): void; /** get current style of current element */ getStyle(currentElement: any, option: any): any; /** set new style to current element */ setStyle(currentElement: any, option: any, value: any): void; /** show hidden element */ showElement(element: any): void; /** helper function to convert color to hex */ _componentToHex(color: any): any; /** get the markers for a specific color **/ getMarkersForColor(color: any): any[]; /** get default marker for specific color **/ getDefaultMarkerForColor(color: any): any; }