leaflet-styleeditor-minified
Version:
Edit the style of features drawn within Leaflet.
32 lines (31 loc) • 1.19 kB
TypeScript
import { Form } from '../form';
import { StyleEditorClass } from '../StyleEditorClass';
export interface FormElementClass {
new (parentForm: Form, parentUiElement: HTMLElement, styleOption: string): FormElement;
}
/** FormElements are part of a Form for a specific styling option (i.e. color) */
export declare abstract class FormElement extends StyleEditorClass {
styleOption: string;
protected title: string;
protected uiElement: HTMLElement;
protected parentForm: Form;
constructor(parentForm: Form, parentUiElement: HTMLElement, styleOption: string);
/** create uiElement and content */
private create;
/** create title */
createTitle(): void;
/** create content (where the actual modification takes place) */
createContent(): void;
/** style the FormElement and show it */
show(): void;
/** show the FormElement */
showForm(): void;
/** hide the FormElement */
hide(): void;
/** style the FormElement */
style(): void;
/** what to do when lost focus */
lostFocus(): void;
/** set style - used when the FormElement wants to change the styling option */
setStyle(value: string): void;
}