Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

terra-draw

Package Overview
Dependencies
Maintainers
0
Versions
81
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 1.0.0-beta.10 to 1.0.0-beta.11

12

dist/modes/linestring/linestring.mode.d.ts
import { TerraDrawMouseEvent, TerraDrawAdapterStyling, TerraDrawKeyboardEvent, HexColorStyling, NumericStyling, Cursor } from "../../common";
import { Position } from "geojson";
import { BaseModeOptions, CustomStyling, TerraDrawBaseDrawMode } from "../base.mode";

@@ -29,6 +30,8 @@ import { BehaviorConfig } from "../base.behavior";

}
interface Snapping {
toCoordinate?: boolean;
toCustom?: (event: TerraDrawMouseEvent) => Position | undefined;
}
interface TerraDrawLineStringModeOptions<T extends CustomStyling> extends BaseModeOptions<T> {
snapping?: {
toCoordinate?: boolean;
};
snapping?: Snapping;
pointerDistance?: number;

@@ -45,3 +48,3 @@ keyEvents?: TerraDrawLineStringModeKeyEvents | null;

private keyEvents;
private snappingEnabled;
private snapping;
private cursors;

@@ -86,3 +89,4 @@ private mouseMove;

validateFeature(feature: unknown): StoreValidation;
private snapCoordinate;
}
export {};
import { TerraDrawMouseEvent, TerraDrawAdapterStyling, TerraDrawKeyboardEvent, HexColorStyling, NumericStyling, Cursor } from "../../common";
import { Position } from "geojson";
import { TerraDrawBaseDrawMode, BaseModeOptions, CustomStyling } from "../base.mode";

@@ -27,7 +28,9 @@ import { BehaviorConfig } from "../base.behavior";

}
interface Snapping {
toLine?: boolean;
toCoordinate?: boolean;
toCustom?: (event: TerraDrawMouseEvent) => Position | undefined;
}
interface TerraDrawPolygonModeOptions<T extends CustomStyling> extends BaseModeOptions<T> {
snapping?: {
toLine?: boolean;
toCoordinate?: boolean;
};
snapping?: Snapping;
pointerDistance?: number;

@@ -42,3 +45,3 @@ keyEvents?: TerraDrawPolygonModeKeyEvents | null;

private keyEvents;
private snappingEnabled;
private snapping;
private snappedPointId;

@@ -45,0 +48,0 @@ private lineSnapping;

@@ -196,7 +196,9 @@ import { test, expect } from "@playwright/test";

}) => {
const configQueryParam: TestConfigOptions[] = config
? [...config, "snappingCoordinate"]
: ["snappingCoordinate"];
const mapDiv = await setupMap({
page,
configQueryParam: config
? [...config, "snappingCoordinate"]
: undefined,
configQueryParam,
});

@@ -203,0 +205,0 @@ await changeMode({ page, mode });

@@ -29,4 +29,5 @@ import typescriptEslint from "@typescript-eslint/eslint-plugin";

"@typescript-eslint/no-explicit-any": "warn",
"no-console": process.env.CI ? "error" : "warn",
},
},
];
{
"name": "terra-draw",
"version": "1.0.0-beta.10",
"version": "1.0.0-beta.11",
"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