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

leaflet-editable-textbox

Package Overview
Dependencies
Maintainers
2
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

leaflet-editable-textbox - npm Package Compare versions

Comparing version 1.0.15 to 1.0.16

2

package.json
{
"name": "leaflet-editable-textbox",
"version": "1.0.15",
"version": "1.0.16",
"description": "TextBox for Leaflet.Editable",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -166,3 +166,6 @@ /**

_updateTextAreaBounds: function() {
var scale, latlngs, pos, size;
var scale;
var pos;
var size;
var center;
var feature = this.feature;

@@ -172,2 +175,3 @@ var bounds = feature._bounds;

var map = this.map;
var bounds;

@@ -177,10 +181,14 @@ if (null !== textArea) {

scale = feature._getScale(map.getZoom());
latlngs = feature._boundsToLatLngs(bounds);
pos = map.latLngToLayerPoint(latlngs[1]);
size = map.latLngToLayerPoint(latlngs[3]).subtract(pos);
bounds = feature.getBounds();
center = map.latLngToLayerPoint(bounds.getCenter());
pos = map.latLngToLayerPoint(bounds.getNorthWest());
size = L.point(2 * Math.abs(center.x - pos.x),
2 * Math.abs(center.y - pos.y))
.divideBy(scale)
.round();
L.DomUtil
.setSize(textArea, size.divideBy(scale).round())
.setSize(textArea, size)
.setTransform(textArea, pos, scale.toFixed(3));
textArea.style.display = '';
textArea.style.display = '';
textArea.style.position = 'absolute';

@@ -187,0 +195,0 @@ textArea.setAttribute('spellcheck', false);

@@ -70,5 +70,7 @@ /**

var scale = layer._getScale(this._map.getZoom());
var pos = layer._rings[0][1];
var size = layer._rings[0][3].subtract(pos).divideBy(scale);
var bounds = layer.getBounds();
var center = layer._map.latLngToLayerPoint(bounds.getCenter());
var pos = layer._map.latLngToLayerPoint(bounds.getNorthWest());
var size = L.point(2 * Math.abs(center.x - pos.x),
2 * Math.abs(center.y - pos.y)).divideBy(scale);
var chars = text.split('');

@@ -75,0 +77,0 @@ var line = chars.shift();

@@ -79,4 +79,5 @@

_updatePosition: function() {
if (null !== this._textNode && 0 !== this._rings.length) {
var pos = this._rings[0][1];
if (null !== this._textNode) {
var bounds = this.getBounds();
var pos = this._map.latLngToLayerPoint(bounds.getNorthWest());
var textMatrix = new L.Matrix(1, 0, 0, 1, 0, 0)

@@ -83,0 +84,0 @@ .translate(pos)

Sorry, the diff of this file is too big to display

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