Socket
Socket
Sign inDemoInstall

terra-draw

Package Overview
Dependencies
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

terra-draw - npm Package Compare versions

Comparing version 0.0.1-alpha.65 to 0.0.1-alpha.66

1

dist/adapters/arcgis-maps-sdk.adapter.d.ts

@@ -41,2 +41,3 @@ import { SetCursor, TerraDrawCallbacks, TerraDrawChanges, TerraDrawStylingFunction } from "../common";

unregister(): void;
getCoordinatePrecision(): number;
/**

@@ -43,0 +44,0 @@ * Returns the longitude and latitude coordinates from a given PointerEvent on the map.

@@ -90,2 +90,3 @@ /// <reference types="google.maps" />

clear(): void;
getCoordinatePrecision(): number;
}

@@ -97,2 +97,4 @@ import { TerraDrawChanges, SetCursor, TerraDrawStylingFunction, TerraDrawCallbacks } from "../common";

register(callbacks: TerraDrawCallbacks): void;
getCoordinatePrecision(): number;
unregister(): void;
}

@@ -88,3 +88,5 @@ import { TerraDrawChanges, SetCursor, TerraDrawStylingFunction, TerraDrawCallbacks } from "../common";

clear(): void;
getCoordinatePrecision(): number;
unregister(): void;
register(callbacks: TerraDrawCallbacks): void;
}

@@ -11,2 +11,3 @@ import { TerraDrawChanges, SetCursor, TerraDrawStylingFunction, TerraDrawCallbacks } from "../common";

unregister(): void;
getCoordinatePrecision(): number;
/**

@@ -13,0 +14,0 @@ * Returns the longitude and latitude coordinates from a given PointerEvent on the map.

@@ -117,3 +117,5 @@ import { TerraDrawChanges, SetCursor, TerraDrawStylingFunction, TerraDrawCallbacks } from "../common";

register(callbacks: TerraDrawCallbacks): void;
getCoordinatePrecision(): number;
unregister(): void;
}
export {};

@@ -61,2 +61,4 @@ import { StoreChangeHandler, GeoJSONStore, GeoJSONStoreFeatures, FeatureId } from "./store/store";

}
type ValidationContext = Pick<TerraDrawModeRegisterConfig, "project" | "unproject" | "coordinatePrecision">;
export type Validation = (feature: GeoJSONStoreFeatures, context: ValidationContext) => boolean;
export type TerraDrawModeState = "unregistered" | "registered" | "started" | "drawing" | "selecting" | "stopped";

@@ -105,1 +107,2 @@ export interface TerraDrawCallbacks {

};
export {};

6

dist/modes/select/behaviors/drag-coordinate-resize.behavior.d.ts

@@ -1,2 +0,2 @@

import { TerraDrawMouseEvent } from "../../../common";
import { TerraDrawMouseEvent, Validation } from "../../../common";
import { BehaviorConfig, TerraDrawModeBehavior } from "../../base.behavior";

@@ -6,3 +6,3 @@ import { PixelDistanceBehavior } from "../../pixel-distance.behavior";

import { SelectionPointBehavior } from "./selection-point.behavior";
import { FeatureId, GeoJSONStoreFeatures } from "../../../store/store";
import { FeatureId } from "../../../store/store";
export type ResizeOptions = "center-web-mercator" | "opposite-web-mercator" | "center-fixed-web-mercator" | "opposite-fixed-web-mercator";

@@ -62,3 +62,3 @@ export declare class DragCoordinateResizeBehavior extends TerraDrawModeBehavior {

*/
drag(event: TerraDrawMouseEvent, resizeOption: ResizeOptions, validateFeature?: (feature: GeoJSONStoreFeatures) => boolean): boolean;
drag(event: TerraDrawMouseEvent, resizeOption: ResizeOptions, validateFeature?: Validation): boolean;
}

@@ -1,2 +0,2 @@

import { TerraDrawMouseEvent } from "../../../common";
import { TerraDrawMouseEvent, Validation } from "../../../common";
import { BehaviorConfig, TerraDrawModeBehavior } from "../../base.behavior";

@@ -6,3 +6,3 @@ import { PixelDistanceBehavior } from "../../pixel-distance.behavior";

import { SelectionPointBehavior } from "./selection-point.behavior";
import { FeatureId, GeoJSONStoreFeatures } from "../../../store/store";
import { FeatureId } from "../../../store/store";
export declare class DragCoordinateBehavior extends TerraDrawModeBehavior {

@@ -17,3 +17,3 @@ readonly config: BehaviorConfig;

getDraggableIndex(event: TerraDrawMouseEvent, selectedId: FeatureId): number;
drag(event: TerraDrawMouseEvent, allowSelfIntersection: boolean, validateFeature?: (feature: GeoJSONStoreFeatures) => boolean): boolean;
drag(event: TerraDrawMouseEvent, allowSelfIntersection: boolean, validateFeature?: Validation): boolean;
isDragging(): boolean;

@@ -20,0 +20,0 @@ startDragging(id: FeatureId, index: number): void;

@@ -1,2 +0,2 @@

import { TerraDrawMouseEvent } from "../../../common";
import { TerraDrawMouseEvent, Validation } from "../../../common";
import { BehaviorConfig, TerraDrawModeBehavior } from "../../base.behavior";

@@ -6,3 +6,3 @@ import { FeatureAtPointerEventBehavior } from "./feature-at-pointer-event.behavior";

import { MidPointBehavior } from "./midpoint.behavior";
import { FeatureId, GeoJSONStoreFeatures } from "../../../store/store";
import { FeatureId } from "../../../store/store";
export declare class DragFeatureBehavior extends TerraDrawModeBehavior {

@@ -20,3 +20,3 @@ readonly config: BehaviorConfig;

canDrag(event: TerraDrawMouseEvent, selectedId: FeatureId): boolean;
drag(event: TerraDrawMouseEvent, validateFeature?: (feature: GeoJSONStoreFeatures) => boolean): false | undefined;
drag(event: TerraDrawMouseEvent, validateFeature?: Validation): false | undefined;
}

@@ -1,6 +0,6 @@

import { TerraDrawMouseEvent } from "../../../common";
import { TerraDrawMouseEvent, Validation } from "../../../common";
import { BehaviorConfig, TerraDrawModeBehavior } from "../../base.behavior";
import { SelectionPointBehavior } from "./selection-point.behavior";
import { MidPointBehavior } from "./midpoint.behavior";
import { FeatureId, GeoJSONStoreFeatures } from "../../../store/store";
import { FeatureId } from "../../../store/store";
export declare class RotateFeatureBehavior extends TerraDrawModeBehavior {

@@ -13,3 +13,3 @@ readonly config: BehaviorConfig;

reset(): void;
rotate(event: TerraDrawMouseEvent, selectedId: FeatureId, validateFeature?: (feature: GeoJSONStoreFeatures) => boolean): false | undefined;
rotate(event: TerraDrawMouseEvent, selectedId: FeatureId, validateFeature?: Validation): false | undefined;
}

@@ -1,6 +0,6 @@

import { TerraDrawMouseEvent } from "../../../common";
import { TerraDrawMouseEvent, Validation } from "../../../common";
import { BehaviorConfig, TerraDrawModeBehavior } from "../../base.behavior";
import { SelectionPointBehavior } from "./selection-point.behavior";
import { MidPointBehavior } from "./midpoint.behavior";
import { FeatureId, GeoJSONStoreFeatures } from "../../../store/store";
import { FeatureId } from "../../../store/store";
export declare class ScaleFeatureBehavior extends TerraDrawModeBehavior {

@@ -13,3 +13,3 @@ readonly config: BehaviorConfig;

reset(): void;
scale(event: TerraDrawMouseEvent, selectedId: FeatureId, validateFeature?: (feature: GeoJSONStoreFeatures) => boolean): false | undefined;
scale(event: TerraDrawMouseEvent, selectedId: FeatureId, validateFeature?: Validation): false | undefined;
}

@@ -1,2 +0,2 @@

import { TerraDrawMouseEvent, TerraDrawKeyboardEvent, TerraDrawAdapterStyling, HexColorStyling, NumericStyling, Cursor } from "../../common";
import { TerraDrawMouseEvent, TerraDrawKeyboardEvent, TerraDrawAdapterStyling, HexColorStyling, NumericStyling, Cursor, Validation } from "../../common";
import { BaseModeOptions, CustomStyling, TerraDrawBaseSelectMode } from "../base.mode";

@@ -14,3 +14,3 @@ import { BehaviorConfig } from "../base.behavior";

feature?: {
validation?: (geometry: GeoJSONStoreFeatures) => boolean;
validation?: Validation;
draggable?: boolean;

@@ -17,0 +17,0 @@ rotateable?: boolean;

{
"name": "terra-draw",
"version": "0.0.1-alpha.65",
"version": "0.0.1-alpha.66",
"description": "Frictionless map drawing across mapping provider",

@@ -5,0 +5,0 @@ "scripts": {

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc