terra-draw 0.0.1-alpha.23 → 0.0.1-alpha.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/README.md +2 -0
- package/dist/adapters/common/base.adapter.d.ts +1 -1
- package/dist/adapters/google-maps.adapter.d.ts +2 -2
- package/dist/adapters/leaflet.adapter.d.ts +2 -2
- package/dist/adapters/mapbox-gl.adapter.d.ts +2 -2
- package/dist/adapters/maplibre-gl.adapter.d.ts +2 -2
- package/dist/adapters/openlayers.adapter.d.ts +2 -2
- package/dist/terra-draw.cjs +1 -1
- package/dist/terra-draw.cjs.map +1 -1
- package/dist/terra-draw.d.ts +7 -1
- package/dist/terra-draw.modern.js +1 -1
- package/dist/terra-draw.modern.js.map +1 -1
- package/dist/terra-draw.module.js +1 -1
- package/dist/terra-draw.module.js.map +1 -1
- package/dist/terra-draw.umd.js +1 -1
- package/dist/terra-draw.umd.js.map +1 -1
- package/package.json +1 -1
- package/readme.gif +0 -0
- package/scratch/release.sh +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.0.1-alpha.25](https://github.com/JamesLMilner/terra-draw/compare/v0.0.1-alpha.24...v0.0.1-alpha.25) (2023-04-07)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* allow zIndexing of linestrings and polygons for TerraDrawLeafletAdapter ([17a4441](https://github.com/JamesLMilner/terra-draw/commit/17a44416244490b5710560ef1fb20dc728a4730d))
|
|
11
|
+
|
|
12
|
+
### [0.0.1-alpha.24](https://github.com/JamesLMilner/terra-draw/compare/v0.0.1-alpha.23...v0.0.1-alpha.24) (2023-04-07)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* export base adapter and mode so that 3rd party developers can extend ([1662960](https://github.com/JamesLMilner/terra-draw/commit/16629602d8cb7f9b7d163c581ebe23abfd734c5d))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Chore
|
|
21
|
+
|
|
22
|
+
* add example drawing gif image to readme ([edde444](https://github.com/JamesLMilner/terra-draw/commit/edde4442bc3aa6b6854d708edb477bb068331f8e))
|
|
23
|
+
* crop gif to make it a bit cleaner ([6fc4adf](https://github.com/JamesLMilner/terra-draw/commit/6fc4adfb12236428101b8a579649b9ff8ee3e946))
|
|
24
|
+
* update docs ([75c0848](https://github.com/JamesLMilner/terra-draw/commit/75c0848e582db24e287ff81d628de0486ad1e4e7))
|
|
25
|
+
|
|
5
26
|
### [0.0.1-alpha.23](https://github.com/JamesLMilner/terra-draw/compare/v0.0.1-alpha.22...v0.0.1-alpha.23) (2023-04-04)
|
|
6
27
|
|
|
7
28
|
|
package/README.md
CHANGED
|
@@ -7,6 +7,8 @@ Frictionless map drawing across mapping libraries.
|
|
|
7
7
|
|
|
8
8
|
Terra Draw centralises map drawing logic and provides a host of out the box drawing modes that work across different JavaScript mapping libraries. It also also you bring your own modes!
|
|
9
9
|
|
|
10
|
+

|
|
11
|
+
|
|
10
12
|
### Library Support
|
|
11
13
|
|
|
12
14
|
Terra Draw uses the concept of 'adapters' to allow it to work with a host of different mapping libraries. Currently supported are:
|
|
@@ -3,7 +3,7 @@ import { AdapterListener } from "./adapter-listener";
|
|
|
3
3
|
type BasePointerListener = (event: PointerEvent) => void;
|
|
4
4
|
type BaseKeyboardListener = (event: KeyboardEvent) => void;
|
|
5
5
|
type BaseMouseListener = (event: MouseEvent) => void;
|
|
6
|
-
export declare abstract class
|
|
6
|
+
export declare abstract class TerraDrawBaseAdapter {
|
|
7
7
|
constructor(config: {
|
|
8
8
|
coordinatePrecision?: number;
|
|
9
9
|
minPixelDragDistance?: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="google.maps" />
|
|
2
2
|
import { TerraDrawChanges, SetCursor, TerraDrawStylingFunction } from "../common";
|
|
3
|
-
import {
|
|
4
|
-
export declare class TerraDrawGoogleMapsAdapter extends
|
|
3
|
+
import { TerraDrawBaseAdapter } from "./common/base.adapter";
|
|
4
|
+
export declare class TerraDrawGoogleMapsAdapter extends TerraDrawBaseAdapter {
|
|
5
5
|
constructor(config: {
|
|
6
6
|
lib: typeof google.maps;
|
|
7
7
|
map: google.maps.Map;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TerraDrawChanges, SetCursor, TerraDrawStylingFunction } from "../common";
|
|
2
2
|
import L from "leaflet";
|
|
3
|
-
import {
|
|
4
|
-
export declare class TerraDrawLeafletAdapter extends
|
|
3
|
+
import { TerraDrawBaseAdapter } from "./common/base.adapter";
|
|
4
|
+
export declare class TerraDrawLeafletAdapter extends TerraDrawBaseAdapter {
|
|
5
5
|
constructor(config: {
|
|
6
6
|
lib: typeof L;
|
|
7
7
|
map: L.Map;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TerraDrawChanges, SetCursor, TerraDrawStylingFunction } from "../common";
|
|
2
2
|
import mapboxgl from "mapbox-gl";
|
|
3
|
-
import {
|
|
4
|
-
export declare class TerraDrawMapboxGLAdapter extends
|
|
3
|
+
import { TerraDrawBaseAdapter } from "./common/base.adapter";
|
|
4
|
+
export declare class TerraDrawMapboxGLAdapter extends TerraDrawBaseAdapter {
|
|
5
5
|
constructor(config: {
|
|
6
6
|
map: mapboxgl.Map;
|
|
7
7
|
coordinatePrecision?: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TerraDrawChanges, SetCursor, TerraDrawStylingFunction } from "../common";
|
|
2
2
|
import { Map } from "maplibre-gl";
|
|
3
|
-
import {
|
|
4
|
-
export declare class TerraDrawMapLibreGLAdapter extends
|
|
3
|
+
import { TerraDrawBaseAdapter } from "./common/base.adapter";
|
|
4
|
+
export declare class TerraDrawMapLibreGLAdapter extends TerraDrawBaseAdapter {
|
|
5
5
|
private mapboxglAdapter;
|
|
6
6
|
constructor(config: {
|
|
7
7
|
map: Map;
|
|
@@ -9,7 +9,7 @@ import Style from "ol/style/Style";
|
|
|
9
9
|
import VectorSource from "ol/source/Vector";
|
|
10
10
|
import VectorLayer from "ol/layer/Vector";
|
|
11
11
|
import { toLonLat } from "ol/proj";
|
|
12
|
-
import {
|
|
12
|
+
import { TerraDrawBaseAdapter } from "./common/base.adapter";
|
|
13
13
|
type InjectableOL = {
|
|
14
14
|
Circle: typeof CircleGeom;
|
|
15
15
|
Feature: typeof Feature;
|
|
@@ -21,7 +21,7 @@ type InjectableOL = {
|
|
|
21
21
|
Stroke: typeof Stroke;
|
|
22
22
|
toLonLat: typeof toLonLat;
|
|
23
23
|
};
|
|
24
|
-
export declare class TerraDrawOpenLayersAdapter extends
|
|
24
|
+
export declare class TerraDrawOpenLayersAdapter extends TerraDrawBaseAdapter {
|
|
25
25
|
constructor(config: {
|
|
26
26
|
map: Map;
|
|
27
27
|
lib: InjectableOL;
|