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

leaflet-draw-rotate

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

leaflet-draw-rotate - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

5

dist/leaflet-draw-rotate.js

@@ -1501,4 +1501,2 @@ (function (factory) {

_onScaleStandard: function (evt) {
console.log('_onScaleStandard');
let ptH = this._map.latLngToContainerPoint(evt.latlng);

@@ -1529,2 +1527,3 @@

let handler = this._handlers[indexHandler];
const round = this.options.scaleRounding || 4;
let pathLatLng = null;

@@ -1534,3 +1533,3 @@

for (let j = 0, jj = rings[i].length; j < jj; j++) {
if (latlngs[i][j].lat === handler._latlng.lat && latlngs[i][j].lng === handler._latlng.lng) {
if (+latlngs[i][j].lat.toFixed(round) === +handler._latlng.lat.toFixed(round) && +latlngs[i][j].lng.toFixed(round) === +handler._latlng.lng.toFixed(round)) {
pathLatLng = latlngs[i][j];

@@ -1537,0 +1536,0 @@ }

2

package.json
{
"name": "leaflet-draw-rotate",
"description": "Add rotate functionality to the Leaflet.Draw plugin",
"version": "0.0.2",
"version": "0.0.3",
"license": "See LICENSE in LICENSE",

@@ -6,0 +6,0 @@ "author": "Daniel.Wild@csiro.au",

@@ -37,6 +37,7 @@ # leaflet-draw-rotate [![NPM version][npm-image]][npm-url] [![NPM Downloads][npm-downloads-image]][npm-url]

- **`options.rotateHandleOptions`** - **<[Polyline_options](http://leafletjs.com/reference.html#polyline-options)>** - rotation handle line styles
- **`options.handleLength`** - **Number** - Length of the rotation handle in pixels. Defaults to 20.
- **`options.handleLength`** - **Int** - Length of the rotation handle in pixels. Defaults to 20.
- **`options.rotation`** - **Boolean** - Enable/disable rotation. Default `true`
- **`options.scaling`** - **Boolean** - Enable/disable scaling. Default `true`
- **`options.uniformScaling`** - **Boolean** - Use uniform scaling (maintain aspect ratio). Default `true`
- **`options.scaleRounding`** - **Int** - Decimal rounding value to use when matching non-uniform drag handles (can use this if you encounter [#5](https://github.com/onaci/Leaflet.draw.rotate/issues/5)). Default `4`

@@ -43,0 +44,0 @@ ## Events

@@ -1570,4 +1570,3 @@

_onScaleStandard: function(evt) {
console.log('_onScaleStandard');
let ptH = this._map.latLngToContainerPoint(evt.latlng);

@@ -1596,6 +1595,7 @@

const round = this.options.scaleRounding || 4;
let pathLatLng = null;
for (let i = 0, len = rings.length; i < len; i++) {
for (let j = 0, jj = rings[i].length; j < jj; j++) {
if (latlngs[i][j].lat === handler._latlng.lat && latlngs[i][j].lng === handler._latlng.lng) {
if (+latlngs[i][j].lat.toFixed(round) === +handler._latlng.lat.toFixed(round) && +latlngs[i][j].lng.toFixed(round) === +handler._latlng.lng.toFixed(round)) {
pathLatLng = latlngs[i][j];

@@ -1616,3 +1616,3 @@ }

// on est sur le coin B
let BPrimeLatLng = this._map.containerPointToLatLng(pHonLineOB);
let BPrimeLatLng = this._map.containerPointToLatLng(pHonLineOB);
handler._latlng.lat = BPrimeLatLng.lat;

@@ -1619,0 +1619,0 @@ handler._latlng.lng = BPrimeLatLng.lng;

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