terra-draw
Advanced tools
Comparing version 0.0.1-alpha.57 to 0.0.1-alpha.58
@@ -1,2 +0,2 @@ | ||
import { TerraDrawChanges, SetCursor, TerraDrawStylingFunction } from "../common"; | ||
import { TerraDrawChanges, SetCursor, TerraDrawStylingFunction, TerraDrawCallbacks } from "../common"; | ||
import L from "leaflet"; | ||
@@ -96,2 +96,3 @@ import { BaseAdapterConfig, TerraDrawBaseAdapter } from "./common/base.adapter"; | ||
clear(): void; | ||
register(callbacks: TerraDrawCallbacks): void; | ||
} |
@@ -1,2 +0,2 @@ | ||
import { TerraDrawChanges, SetCursor, TerraDrawStylingFunction } from "../common"; | ||
import { TerraDrawChanges, SetCursor, TerraDrawStylingFunction, TerraDrawCallbacks } from "../common"; | ||
import mapboxgl from "mapbox-gl"; | ||
@@ -88,2 +88,3 @@ import { BaseAdapterConfig, TerraDrawBaseAdapter } from "./common/base.adapter"; | ||
clear(): void; | ||
register(callbacks: TerraDrawCallbacks): void; | ||
} |
@@ -1,2 +0,2 @@ | ||
import { TerraDrawChanges, SetCursor, TerraDrawStylingFunction } from "../common"; | ||
import { TerraDrawChanges, SetCursor, TerraDrawStylingFunction, TerraDrawCallbacks } from "../common"; | ||
import CircleGeom from "ol/geom/Circle"; | ||
@@ -116,3 +116,4 @@ import Feature from "ol/Feature"; | ||
clear(): void; | ||
register(callbacks: TerraDrawCallbacks): void; | ||
} | ||
export {}; |
@@ -72,2 +72,3 @@ import { StoreChangeHandler, GeoJSONStore, GeoJSONStoreFeatures, FeatureId } from "./store/store"; | ||
onClear: () => void; | ||
onReady?(): void; | ||
} | ||
@@ -74,0 +75,0 @@ export interface TerraDrawChanges { |
@@ -58,1 +58,6 @@ import { BehaviorConfig, TerraDrawModeBehavior } from "./base.behavior"; | ||
} | ||
export declare abstract class TerraDrawBaseSelectMode<T extends CustomStyling> extends TerraDrawBaseDrawMode<T> { | ||
type: ModeTypes; | ||
abstract selectFeature(featureId: FeatureId): void; | ||
abstract deselectFeature(featureId: FeatureId): void; | ||
} |
import { TerraDrawMouseEvent, TerraDrawKeyboardEvent, TerraDrawAdapterStyling, HexColorStyling, NumericStyling, Cursor } from "../../common"; | ||
import { BaseModeOptions, CustomStyling, ModeTypes, TerraDrawBaseDrawMode } from "../base.mode"; | ||
import { BaseModeOptions, CustomStyling, TerraDrawBaseSelectMode } from "../base.mode"; | ||
import { BehaviorConfig } from "../base.behavior"; | ||
import { GeoJSONStoreFeatures } from "../../store/store"; | ||
import { FeatureId, GeoJSONStoreFeatures } from "../../store/store"; | ||
import { ResizeOptions } from "./behaviors/drag-coordinate-resize.behavior"; | ||
@@ -62,4 +62,3 @@ type TerraDrawSelectModeKeyEvents = { | ||
} | ||
export declare class TerraDrawSelectMode extends TerraDrawBaseDrawMode<SelectionStyling> { | ||
type: ModeTypes; | ||
export declare class TerraDrawSelectMode extends TerraDrawBaseSelectMode<SelectionStyling> { | ||
mode: string; | ||
@@ -84,7 +83,10 @@ private allowManualDeselection; | ||
constructor(options?: TerraDrawSelectModeOptions<SelectionStyling>); | ||
selectFeature(featureId: FeatureId): void; | ||
setSelecting(): void; | ||
registerBehaviors(config: BehaviorConfig): void; | ||
deselectFeature(): void; | ||
private deselect; | ||
private deleteSelected; | ||
private onRightClick; | ||
private select; | ||
private onLeftClick; | ||
@@ -91,0 +93,0 @@ /** @internal */ |
@@ -26,2 +26,3 @@ import { TerraDrawGoogleMapsAdapter } from "./adapters/google-maps.adapter"; | ||
interface TerraDrawEventListeners { | ||
ready: () => void; | ||
finish: FinishListener; | ||
@@ -50,2 +51,3 @@ change: ChangeListener; | ||
private featuresAtLocation; | ||
private getSelectMode; | ||
/** | ||
@@ -117,2 +119,18 @@ * Allows the setting of a style for a given mode | ||
/** | ||
* Provides the ability to programmatically select a feature using the instances provided select mode. | ||
* If not select mode is provided in the instance, an error will be thrown. If the instance is not currently | ||
* in the select mode, it will switch to it. | ||
* @param id - the id of the feature to select | ||
* @alpha | ||
*/ | ||
selectFeature(id: FeatureId): void; | ||
/** | ||
* Provides the ability to programmatically deselect a feature using the instances provided select mode. | ||
* If not select mode is provided in the instance, an error will be thrown. If the instance is not currently | ||
* in the select mode, it will switch to it. | ||
* @param id - the id of the feature to deselect | ||
* @alpha | ||
*/ | ||
deselectFeature(id: FeatureId): void; | ||
/** | ||
* Returns the next feature id from the store - defaults to UUID4 unless you have | ||
@@ -119,0 +137,0 @@ * set a custom idStrategy. This method can be useful if you are needing creating features |
{ | ||
"name": "terra-draw", | ||
"version": "0.0.1-alpha.57", | ||
"version": "0.0.1-alpha.58", | ||
"description": "Frictionless map drawing across mapping provider", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -27,10 +27,8 @@ <img src="./logo.png" alt="Terra Draw Logo" width="400"/> | ||
### Development | ||
### Development & Contributing | ||
Please see the [the development documentation](./guides/6.DEVELOPMENT.md) | ||
* For development, please see the [the development documentation](./guides/6.DEVELOPMENT.md) | ||
* For guidance on contributing, please see the [the contributing documentation](./guides/CONTRIBUTING.md) | ||
### Contributing | ||
Please see the [the contributing documentation](./guides/CONTRIBUTING.md) | ||
### Project Website | ||
@@ -40,4 +38,8 @@ | ||
### Contact | ||
Email: [contact@terradraw.io](mailto:contact@terradraw.io) | ||
### License | ||
MIT |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4061363
9200
44