Skip to content

Commit

Permalink
Version Packages (#21)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and github-actions[bot] committed Sep 8, 2024
1 parent 1935d2c commit ea84bd5
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 42 deletions.
5 changes: 0 additions & 5 deletions .changeset/gentle-ducks-type.md

This file was deleted.

36 changes: 0 additions & 36 deletions .changeset/proud-dogs-grow.md

This file was deleted.

38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
# @watergis/maplibre-gl-terradraw

## 0.1.1

### Patch Changes

- 1935d2c: refactor: removed unused variable from the code
- 5c56e28: fix: merge modeOptions param into the first argument of constructor to make the interface simple.

In v0.1.0, it used the second argument of constructor to customise drawing options for each Terra Draw mode. The second argment was now merged into the first argument as shown in the below sample code.

```js
const drawControl = new MaplibreTerradrawControl({
// only show polgyon, line and select mode.
modes: ['polygon', 'linestring', 'select'],
modeOptions: {
select: new TerraDrawSelectMode({
flags: {
// only update polygon settings for select mode.
// default settings will be used for other geometry types
// in this case, line uses default options of the plugin.
polygon: {
feature: {
draggable: false, // users cannot drag to move polygon
rotateable: true,
scaleable: true,
coordinates: {
midpoints: false, // users cannot add a node on the middle of edge.
draggable: true,
deletable: false // users cannot delete a node.
}
}
}
}
})
}
});
map.addControl(drawControl, 'top-left');
```

## 0.1.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@watergis/maplibre-gl-terradraw",
"version": "0.1.0",
"version": "0.1.1",
"description": "This plugin is to add controls to your Maplibre for drawing powered by Terra Draw library.",
"type": "module",
"main": "dist/maplibre-gl-terradraw.umd.js",
Expand Down

0 comments on commit ea84bd5

Please sign in to comment.