terra-draw 0.0.1-alpha.0 → 0.0.1-alpha.1
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/package.json +1 -1
- package/.github/workflows/ci.yml +0 -27
- package/.husky/commit-msg +0 -4
- package/.husky/pre-commit +0 -5
- package/ROADMAP.md +0 -63
- package/common/addModeChangeHandler.ts +0 -26
- package/data/sample.ts +0 -10126
package/package.json
CHANGED
package/.github/workflows/ci.yml
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
name: Terra Draw CI Tasks
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [main]
|
|
6
|
-
pull_request:
|
|
7
|
-
types: [opened, synchronize, reopened, ready_for_review]
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
tests:
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
steps:
|
|
13
|
-
- uses: actions/checkout@v2
|
|
14
|
-
- name: Use Node
|
|
15
|
-
uses: actions/setup-node@v1
|
|
16
|
-
with:
|
|
17
|
-
node-version: "16.x"
|
|
18
|
-
- name: Install Parent Folder
|
|
19
|
-
run: npm install
|
|
20
|
-
- name: Ensure no package-lock.json changes
|
|
21
|
-
run: git diff --exit-code
|
|
22
|
-
- name: Build
|
|
23
|
-
run: npm run build
|
|
24
|
-
- name: Test
|
|
25
|
-
run: npm run test
|
|
26
|
-
env:
|
|
27
|
-
CI: true
|
package/.husky/commit-msg
DELETED
package/.husky/pre-commit
DELETED
package/ROADMAP.md
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
## Roadmap
|
|
2
|
-
|
|
3
|
-
A simple file for tracking what's being worked on.
|
|
4
|
-
|
|
5
|
-
## Doing
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
## To do
|
|
9
|
-
|
|
10
|
-
### Bugs
|
|
11
|
-
|
|
12
|
-
- Cross Provider
|
|
13
|
-
- Bug: Possible to create zero area polygons which are unselectable
|
|
14
|
-
- Bug: Snapping can snap to same coordinate mulitple times (idential coordinate proptection?)
|
|
15
|
-
- Bug: Dragging doesn't trigger dragging cursor on mouse down
|
|
16
|
-
- Mapbox
|
|
17
|
-
- Bug (Mapbox): More robust implementation for fixing zIndexing for layers for Mapbox
|
|
18
|
-
- Bug (Mapbox): When drawing second coordinate the line can stop rendering at certain angles
|
|
19
|
-
- Google Maps
|
|
20
|
-
- Bug (Google Maps): Figure out why Polygons move so much slower selection points when dragged
|
|
21
|
-
- Bug (Google Maps): Does not respect midpoint insertion crosshair
|
|
22
|
-
|
|
23
|
-
### Chores
|
|
24
|
-
|
|
25
|
-
- Chore: Figure a more robust way to handle project/unproject in tests
|
|
26
|
-
- Chore: Identical coordinate protection
|
|
27
|
-
- Chore: Type properties for different mode features
|
|
28
|
-
- Chore: Add unit tests for rotation/scaling in Select mode
|
|
29
|
-
|
|
30
|
-
Could Do:
|
|
31
|
-
|
|
32
|
-
- Consider Tablets/Mobile devices
|
|
33
|
-
- Feature: Undo/Redo
|
|
34
|
-
|
|
35
|
-
## Done
|
|
36
|
-
|
|
37
|
-
- Chore: Enable TypeScript strict mode
|
|
38
|
-
- Bug (Leaflet): On click event triggered after dragging coordinate which deselects feature
|
|
39
|
-
- Chore: Demo that can run on GitHub
|
|
40
|
-
- Feature: Select - Scale
|
|
41
|
-
- Feature: Select - Rotation
|
|
42
|
-
- Chore: Come up with strategy for layering functionality/behaviors
|
|
43
|
-
- Bug: Can drag feature when cursor is not dragging over the feature
|
|
44
|
-
- Bug (Leaflet): Dragging coordinate deselects coordinate after drag
|
|
45
|
-
- Feature: Select renders Polygon and LineString coordinates
|
|
46
|
-
- Feature: Drag drawn feature
|
|
47
|
-
- Feature: Configurable keybindings
|
|
48
|
-
- Bug: Can't drag any more
|
|
49
|
-
- Chore: Make store take an array for updates/create etc
|
|
50
|
-
- Chore: Use Position instead of [number,number] for typing
|
|
51
|
-
- Feature: Set cursor
|
|
52
|
-
- Chore: Lifecycle state machine - registered -> start -> stop
|
|
53
|
-
- Chore: Create mock terra draw config
|
|
54
|
-
- Feature: Drag coordinates
|
|
55
|
-
- Chore: Code coverage back to 100% - test custom key bindings
|
|
56
|
-
- Chore: Spatial indexing
|
|
57
|
-
- Bug (Mapbox): Correct zIndexing for layers for Mapbox
|
|
58
|
-
- Feature: Snapping
|
|
59
|
-
- Feature: Insert midpoints
|
|
60
|
-
- Chore: Remove geometry logic from selection mode
|
|
61
|
-
- Feature: Right click to delete coordinate
|
|
62
|
-
- Chore: Show crosshairs when on inserting midpoints
|
|
63
|
-
- Bug (Mapbox): First two points of Mapbox Adapter polygons don't render
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { TerraDraw } from "../src/terra-draw";
|
|
2
|
-
|
|
3
|
-
export const addModeChangeHandler = (
|
|
4
|
-
draw: TerraDraw,
|
|
5
|
-
currentSelected: { button: undefined | HTMLButtonElement; mode: string }
|
|
6
|
-
) => {
|
|
7
|
-
["select", "point", "linestring", "polygon", "freehand", "circle"].forEach(
|
|
8
|
-
(mode) => {
|
|
9
|
-
(document.getElementById(mode) as HTMLButtonElement).addEventListener(
|
|
10
|
-
"click",
|
|
11
|
-
() => {
|
|
12
|
-
currentSelected.mode = mode;
|
|
13
|
-
draw.changeMode(currentSelected.mode);
|
|
14
|
-
|
|
15
|
-
if (currentSelected.button) {
|
|
16
|
-
currentSelected.button.style.color = "565656";
|
|
17
|
-
}
|
|
18
|
-
currentSelected.button = document.getElementById(
|
|
19
|
-
mode
|
|
20
|
-
) as HTMLButtonElement;
|
|
21
|
-
currentSelected.button.style.color = "#27ccff";
|
|
22
|
-
}
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
);
|
|
26
|
-
};
|