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

leaflet-editable-textbox

Package Overview
Dependencies
Maintainers
1
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.3 to 1.0.4

src/Editable.Textbox.js

1

demo/js/index.js
var L = require('leaflet');
require('leaflet-editable');
require('../../');

@@ -4,0 +3,0 @@ require('../../src/SVG');

(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g=(g.L||(g.L = {}));g=(g.Editable||(g.Editable = {}));g.Textbox = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
/*eslint no-undef: "error"*/
/*eslint-env node*/
var L = require('leaflet');
require('leaflet-editable');

@@ -7,5 +11,5 @@ require('leaflet-path-transform/src/Matrix');

require('./src/Util');
require('./src/Editable.Textbox')
require('./src/Editable.Textbox');
module.exports = L.Editable.TextBox;
module.exports = L.Editable.TextBoxEditor;

@@ -380,4 +384,7 @@ },{"./src/Editable.Textbox":3,"./src/Textbox":4,"./src/Util":5,"leaflet":undefined,"leaflet-editable":undefined,"leaflet-path-transform/src/Matrix":2}],2:[function(require,module,exports){

.setTransform(textArea, pos, scale.toFixed(3));
textArea.style.display = '';
textArea.style.display = '';
textArea.style.position = 'absolute';
textArea.setAttribute('spellcheck', false);
this._focus();

@@ -449,5 +456,2 @@ } else {

_text: 'Please, add text',
_textNode: null,
options: {

@@ -461,3 +465,5 @@ padding: 2,

fontFamily: '',
ratio: 1
ratio: 1,
text: 'Please, add text'
//TODO: wrapBy: 'letter', 'char', 'nowrap', etc.

@@ -467,2 +473,10 @@ },

initialize: function(bounds, options) {
L.Rectangle.prototype.initialize.call(this, bounds, options);
this._text = this.options.text;
this._textNode = null;
},
/**

@@ -541,2 +555,2 @@ * @param {Object} style

});
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyaWZ5L25vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJpbmRleC5qcyIsIm5vZGVfbW9kdWxlcy9sZWFmbGV0LXBhdGgtdHJhbnNmb3JtL3NyYy9NYXRyaXguanMiLCJzcmMvRWRpdGFibGUuVGV4dGJveC5qcyIsInNyYy9UZXh0Ym94LmpzIiwic3JjL1V0aWwuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUNBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FDUkE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUN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uICAgKiBAcGFyYW0ge051bWJlcn0gYlxuICAgKiBAcGFyYW0ge051bWJlcn0gY1xuICAgKiBAcGFyYW0ge051bWJlcn0gZFxuICAgKiBAcGFyYW0ge051bWJlcn0gZVxuICAgKiBAcGFyYW0ge051bWJlcn0gZlxuICAgKi9cbiAgX2FkZDogZnVuY3Rpb24oYSwgYiwgYywgZCwgZSwgZikge1xuICAgIHZhciByZXN1bHQgPSBbW10sIFtdLCBbXV07XG4gICAgdmFyIHNyYyA9IHRoaXMuX21hdHJpeDtcbiAgICB2YXIgbSA9IFtcbiAgICAgIFtzcmNbMF0sIHNyY1syXSwgc3JjWzRdXSxcbiAgICAgIFtzcmNbMV0sIHNyY1szXSwgc3JjWzVdXSxcbiAgICAgIFsgICAgIDAsICAgICAgMCwgICAgIDFdXG4gICAgXTtcbiAgICB2YXIgb3RoZXIgPSBbXG4gICAgICBbYSwgYywgZV0sXG4gICAgICBbYiwgZCwgZl0sXG4gICAgICBbMCwgMCwgMV1cbiAgICBdLCB2YWw7XG5cblxuICAgIGlmIChhICYmIGEgaW5zdGFuY2VvZiBMLk1hdHJpeCkge1xuICAgICAgc3JjID0gYS5fbWF0cml4O1xuICAgICAgb3RoZXIgPSBbXG4gICAgICAgIFtzcmNbMF0sIHNyY1syXSwgc3JjWzRdXSxcbiAgICAgICAgW3NyY1sxXSwgc3JjWzNdLCBzcmNbNV1dLFxuICAgICAgICBbICAgICAwLCAgICAgIDAsICAgICAxXV07XG4gICAgfVxuXG4gICAgZm9yICh2YXIgaSA9IDA7IGkgPCAzOyBpKyspIHtcbiAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgMzsgaisrKSB7XG4gICAgICAgIHZhbCA9IDA7XG4gICAgICAgIGZvciAodmFyIGsgPSAwOyBrIDwgMzsgaysrKSB7XG4gICAgICAgICAgdmFsICs9IG1baV1ba10gKiBvdGhlcltrXVtqXTtcbiAgICAgICAgfVxuICAgICAgICByZXN1bHRbaV1bal0gPSB2YWw7XG4gICAgICB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Ll91cGRhdGVQYXRoLmNhbGwodGhpcyk7XG4gICAgdGhpcy5fdXBkYXRlUG9zaXRpb24oKTtcbiAgfVxuXG59KTtcbiIsIi8qKlxuICogQHBhcmFtICB7RWxlbWVudH0gZWxlbWVudFxuICogQHBhcmFtICB7TC5Qb2ludH0gc2l6ZVxuICogQHJldHVybiB7T2JqZWN0fSBzZWxmXG4gKi9cbkwuRG9tVXRpbC5zZXRTaXplID0gIEwuRG9tVXRpbC5zZXRTaXplIHx8IGZ1bmN0aW9uKGVsZW1lbnQsIHNpemUpIHtcbiAgZWxlbWVudC5zdHlsZS53aWR0aCA9IHNpemUueCAgKyAncHgnO1xuICBlbGVtZW50LnN0eWxlLmhlaWdodCA9IHNpemUueSArICdweCc7XG4gIHJldHVybiB0aGlzO1xufTtcbiJdfQ==

@@ -1,2 +0,2 @@

(function(t){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=t()}else if(typeof define==="function"&&define.amd){define([],t)}else{var e;if(typeof window!=="undefined"){e=window}else if(typeof global!=="undefined"){e=global}else if(typeof self!=="undefined"){e=self}else{e=this}e=e.L||(e.L={});e=e.Editable||(e.Editable={});e.Textbox=t()}})(function(){var t,e,i;return function n(t,e,i){function r(a,s){if(!e[a]){if(!t[a]){var l=typeof require=="function"&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var f=new Error("Cannot find module '"+a+"'");throw f.code="MODULE_NOT_FOUND",f}var d=e[a]={exports:{}};t[a][0].call(d.exports,function(e){var i=t[a][1][e];return r(i?i:e)},d,d.exports,n,t,e,i)}return e[a].exports}var o=typeof require=="function"&&require;for(var a=0;a<i.length;a++)r(i[a]);return r}({1:[function(t,e,i){var n=t("leaflet");t("leaflet-editable");t("leaflet-path-transform/src/Matrix");t("./src/Textbox");t("./src/Util");t("./src/Editable.Textbox");e.exports=n.Editable.TextBox},{"./src/Editable.Textbox":3,"./src/Textbox":4,"./src/Util":5,leaflet:undefined,"leaflet-editable":undefined,"leaflet-path-transform/src/Matrix":2}],2:[function(t,e,i){L.Matrix=function(t,e,i,n,r,o){this._matrix=[t,e,i,n,r,o]};L.Matrix.prototype={transform:function(t){return this._transform(t.clone())},_transform:function(t){var e=this._matrix;var i=t.x,n=t.y;t.x=e[0]*i+e[1]*n+e[4];t.y=e[2]*i+e[3]*n+e[5];return t},untransform:function(t){var e=this._matrix;return new L.Point((t.x/e[0]-e[4])/e[0],(t.y/e[2]-e[5])/e[2])},clone:function(){var t=this._matrix;return new L.Matrix(t[0],t[1],t[2],t[3],t[4],t[5])},translate:function(t){if(t===undefined){return new L.Point(this._matrix[4],this._matrix[5])}var e,i;if(typeof t==="number"){e=i=t}else{e=t.x;i=t.y}return this._add(1,0,0,1,e,i)},scale:function(t,e){if(t===undefined){return new L.Point(this._matrix[0],this._matrix[3])}var i,n;e=e||L.point(0,0);if(typeof t==="number"){i=n=t}else{i=t.x;n=t.y}return this._add(i,0,0,n,e.x,e.y)._add(1,0,0,1,-e.x,-e.y)},rotate:function(t,e){var i=Math.cos(t);var n=Math.sin(t);e=e||new L.Point(0,0);return this._add(i,n,-n,i,e.x,e.y)._add(1,0,0,1,-e.x,-e.y)},flip:function(){this._matrix[1]*=-1;this._matrix[2]*=-1;return this},_add:function(t,e,i,n,r,o){var a=[[],[],[]];var s=this._matrix;var l=[[s[0],s[2],s[4]],[s[1],s[3],s[5]],[0,0,1]];var f=[[t,i,r],[e,n,o],[0,0,1]],d;if(t&&t instanceof L.Matrix){s=t._matrix;f=[[s[0],s[2],s[4]],[s[1],s[3],s[5]],[0,0,1]]}for(var u=0;u<3;u++){for(var h=0;h<3;h++){d=0;for(var x=0;x<3;x++){d+=l[u][x]*f[x][h]}a[u][h]=d}}this._matrix=[a[0][0],a[1][0],a[0][1],a[1][1],a[0][2],a[1][2]];return this}};L.matrix=function(t,e,i,n,r,o){return new L.Matrix(t,e,i,n,r,o)}},{}],3:[function(t,e,i){/**
(function(t){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=t()}else if(typeof define==="function"&&define.amd){define([],t)}else{var e;if(typeof window!=="undefined"){e=window}else if(typeof global!=="undefined"){e=global}else if(typeof self!=="undefined"){e=self}else{e=this}e=e.L||(e.L={});e=e.Editable||(e.Editable={});e.Textbox=t()}})(function(){var t,e,i;return function n(t,e,i){function r(a,s){if(!e[a]){if(!t[a]){var l=typeof require=="function"&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var f=new Error("Cannot find module '"+a+"'");throw f.code="MODULE_NOT_FOUND",f}var d=e[a]={exports:{}};t[a][0].call(d.exports,function(e){var i=t[a][1][e];return r(i?i:e)},d,d.exports,n,t,e,i)}return e[a].exports}var o=typeof require=="function"&&require;for(var a=0;a<i.length;a++)r(i[a]);return r}({1:[function(t,e,i){var n=t("leaflet");t("leaflet-editable");t("leaflet-path-transform/src/Matrix");t("./src/Textbox");t("./src/Util");t("./src/Editable.Textbox");e.exports=n.Editable.TextBoxEditor},{"./src/Editable.Textbox":3,"./src/Textbox":4,"./src/Util":5,leaflet:undefined,"leaflet-editable":undefined,"leaflet-path-transform/src/Matrix":2}],2:[function(t,e,i){L.Matrix=function(t,e,i,n,r,o){this._matrix=[t,e,i,n,r,o]};L.Matrix.prototype={transform:function(t){return this._transform(t.clone())},_transform:function(t){var e=this._matrix;var i=t.x,n=t.y;t.x=e[0]*i+e[1]*n+e[4];t.y=e[2]*i+e[3]*n+e[5];return t},untransform:function(t){var e=this._matrix;return new L.Point((t.x/e[0]-e[4])/e[0],(t.y/e[2]-e[5])/e[2])},clone:function(){var t=this._matrix;return new L.Matrix(t[0],t[1],t[2],t[3],t[4],t[5])},translate:function(t){if(t===undefined){return new L.Point(this._matrix[4],this._matrix[5])}var e,i;if(typeof t==="number"){e=i=t}else{e=t.x;i=t.y}return this._add(1,0,0,1,e,i)},scale:function(t,e){if(t===undefined){return new L.Point(this._matrix[0],this._matrix[3])}var i,n;e=e||L.point(0,0);if(typeof t==="number"){i=n=t}else{i=t.x;n=t.y}return this._add(i,0,0,n,e.x,e.y)._add(1,0,0,1,-e.x,-e.y)},rotate:function(t,e){var i=Math.cos(t);var n=Math.sin(t);e=e||new L.Point(0,0);return this._add(i,n,-n,i,e.x,e.y)._add(1,0,0,1,-e.x,-e.y)},flip:function(){this._matrix[1]*=-1;this._matrix[2]*=-1;return this},_add:function(t,e,i,n,r,o){var a=[[],[],[]];var s=this._matrix;var l=[[s[0],s[2],s[4]],[s[1],s[3],s[5]],[0,0,1]];var f=[[t,i,r],[e,n,o],[0,0,1]],d;if(t&&t instanceof L.Matrix){s=t._matrix;f=[[s[0],s[2],s[4]],[s[1],s[3],s[5]],[0,0,1]]}for(var u=0;u<3;u++){for(var h=0;h<3;h++){d=0;for(var x=0;x<3;x++){d+=l[u][x]*f[x][h]}a[u][h]=d}}this._matrix=[a[0][0],a[1][0],a[0][1],a[1][1],a[0][2],a[1][2]];return this}};L.matrix=function(t,e,i,n,r,o){return new L.Matrix(t,e,i,n,r,o)}},{}],3:[function(t,e,i){/**
* TextBox

@@ -7,2 +7,2 @@ *

*/
L.Editable.TextBoxEditor=L.Editable.RectangleEditor.extend({options:{textareaPadding:1},initialize:function(t,e,i){this._textArea=null;this._text=null;L.Editable.RectangleEditor.prototype.initialize.call(this,t,e,i)},updateStyle:function(){if(null!==this._textArea){var t=this._textArea.style;var e=this.feature.options;t.fontSize=e.fontSize+"px";t.color=e.fontColor;t.fontFamily=e.fontFamily}},enable:function(){L.Editable.RectangleEditor.prototype.enable.call(this);this.map.on("dragend",this._focus,this).on("zoomanim",this._animateZoom,this).on("zoomend",this._updateTextAreaBounds,this);if(null===this._textArea){this._textArea=L.DomUtil.create("textarea","leaflet-zoom-animated leaflet-textbox");var t=this._textArea.style;t.resize="none";t.border="none";t.padding=this.options.textareaPadding+"px";t.backgroundColor="transparent";this.updateStyle();this.map.getPane("markerPane").appendChild(this._textArea);if(this._text){this._textArea.innerHTML=this._text}this._updateTextAreaBounds()}return this},setText:function(t){this._text=t;if(null!==this._textArea){this._textArea.value=t}},getText:function(){this._text=this._textArea.value;return this._text},disable:function(){if(this._enabled){this.map.off("dragend",this._focus,this).off("zoomanim",this._animateZoom,this).off("zoomend",this._updateTextAreaBounds,this);if(null!==this.textArea){this.getText();this._textArea.parentNode.removeChild(this._textArea);this._textArea=null}}L.Editable.RectangleEditor.prototype.disable.call(this);return this},updateBounds:function(t){L.Editable.RectangleEditor.prototype.updateBounds.call(this,t);return this._updateTextAreaBounds()},_focus:function(){if(null!==this._textArea){L.Util.requestAnimFrame(function(){this._textArea.focus()},this)}},_animateZoom:function(t){var e=this.feature._bounds;var i=this.feature._getScale(t.zoom);var n=this.map._latLngToNewLayerPoint(e.getNorthWest(),t.zoom,t.center);L.DomUtil.setTransform(this._textArea,n,i.toFixed(3))},_updateTextAreaBounds:function(){var t,e,i,n;var r=this.feature;var o=r._bounds;var a=this._textArea;var s=this.map;if(null!==a){if(null!==o){t=r._getScale(s.getZoom());e=r._boundsToLatLngs(o);i=s.latLngToLayerPoint(e[1]);n=s.latLngToLayerPoint(e[3]).subtract(i);L.DomUtil.setSize(a,n.divideBy(t).round()).setTransform(a,i,t.toFixed(3));a.style.display="";a.setAttribute("spellcheck",false);this._focus()}else{a.style.display="none"}}return this}});L.TextBox.include({enableEdit:function(t){if(!this.editor){this.createEditor(t)}var e=L.Rectangle.prototype.enableEdit.call(this,t);if(this._textNode){this._textNode.parentNode.removeChild(this._textNode);this._textNode=null}e=L.Rectangle.prototype.enableEdit.call(this,t);this.editor.setText(this._text);return e},disableEdit:function(){if(this.editor){this._text=this.editor.getText()}L.Rectangle.prototype.disableEdit.call(this);this._renderText();return this},getEditorClass:function(){return L.Editable.TextBoxEditor}});L.Editable.prototype.startTextBox=function(t,e){return this.startRectangle(null,L.extend({rectangleClass:L.TextBox},e))}},{}],4:[function(t,e,i){L.TextBox=L.Rectangle.extend({_text:"Please, add text",_textNode:null,options:{padding:2,fontSize:12,fillOpacity:.5,fillColor:"#ffffff",weight:1,fontColor:"",fontFamily:"",ratio:1},setStyle:function(t){L.setOptions(this,t);if(this.editor&&this.editor._enabled){this.editor.updateStyle()}else{this._renderText()}},updateStyle:function(){var t=this._textNode;var e=this.options;if(null!==t){t.setAttribute("font-family",e.fontFamily);t.setAttribute("font-size",e.fontSize+"px");t.setAttribute("fill",e.fontColor)}},_renderText:function(){this._textNode=this._renderer.renderText(this);this._path.parentNode.insertBefore(this._textNode,this._path.nextSibling);this.updateStyle();this._updatePosition()},_updatePosition:function(){if(null!==this._textNode&&0!==this._rings.length){var t=this._rings[0][1];var e=new L.Matrix(1,0,0,1,0,0).translate(t).scale(this._getScale(this._map.getZoom()));this._textNode.setAttribute("transform","matrix("+e._matrix.join(" ")+")")}},_getScale:function(t){return this._map?Math.pow(2,t)*this.options.ratio:1},_updatePath:function(){L.Rectangle.prototype._updatePath.call(this);this._updatePosition()}})},{}],5:[function(t,e,i){L.DomUtil.setSize=L.DomUtil.setSize||function(t,e){t.style.width=e.x+"px";t.style.height=e.y+"px";return this}},{}]},{},[1])(1)});
L.Editable.TextBoxEditor=L.Editable.RectangleEditor.extend({options:{textareaPadding:1},initialize:function(t,e,i){this._textArea=null;this._text=null;L.Editable.RectangleEditor.prototype.initialize.call(this,t,e,i)},updateStyle:function(){if(null!==this._textArea){var t=this._textArea.style;var e=this.feature.options;t.fontSize=e.fontSize+"px";t.color=e.fontColor;t.fontFamily=e.fontFamily}},enable:function(){L.Editable.RectangleEditor.prototype.enable.call(this);this.map.on("dragend",this._focus,this).on("zoomanim",this._animateZoom,this).on("zoomend",this._updateTextAreaBounds,this);if(null===this._textArea){this._textArea=L.DomUtil.create("textarea","leaflet-zoom-animated leaflet-textbox");var t=this._textArea.style;t.resize="none";t.border="none";t.padding=this.options.textareaPadding+"px";t.backgroundColor="transparent";this.updateStyle();this.map.getPane("markerPane").appendChild(this._textArea);if(this._text){this._textArea.innerHTML=this._text}this._updateTextAreaBounds()}return this},setText:function(t){this._text=t;if(null!==this._textArea){this._textArea.value=t}},getText:function(){this._text=this._textArea.value;return this._text},disable:function(){if(this._enabled){this.map.off("dragend",this._focus,this).off("zoomanim",this._animateZoom,this).off("zoomend",this._updateTextAreaBounds,this);if(null!==this.textArea){this.getText();this._textArea.parentNode.removeChild(this._textArea);this._textArea=null}}L.Editable.RectangleEditor.prototype.disable.call(this);return this},updateBounds:function(t){L.Editable.RectangleEditor.prototype.updateBounds.call(this,t);return this._updateTextAreaBounds()},_focus:function(){if(null!==this._textArea){L.Util.requestAnimFrame(function(){this._textArea.focus()},this)}},_animateZoom:function(t){var e=this.feature._bounds;var i=this.feature._getScale(t.zoom);var n=this.map._latLngToNewLayerPoint(e.getNorthWest(),t.zoom,t.center);L.DomUtil.setTransform(this._textArea,n,i.toFixed(3))},_updateTextAreaBounds:function(){var t,e,i,n;var r=this.feature;var o=r._bounds;var a=this._textArea;var s=this.map;if(null!==a){if(null!==o){t=r._getScale(s.getZoom());e=r._boundsToLatLngs(o);i=s.latLngToLayerPoint(e[1]);n=s.latLngToLayerPoint(e[3]).subtract(i);L.DomUtil.setSize(a,n.divideBy(t).round()).setTransform(a,i,t.toFixed(3));a.style.display="";a.style.position="absolute";a.setAttribute("spellcheck",false);this._focus()}else{a.style.display="none"}}return this}});L.TextBox.include({enableEdit:function(t){if(!this.editor){this.createEditor(t)}var e=L.Rectangle.prototype.enableEdit.call(this,t);if(this._textNode){this._textNode.parentNode.removeChild(this._textNode);this._textNode=null}e=L.Rectangle.prototype.enableEdit.call(this,t);this.editor.setText(this._text);return e},disableEdit:function(){if(this.editor){this._text=this.editor.getText()}L.Rectangle.prototype.disableEdit.call(this);this._renderText();return this},getEditorClass:function(){return L.Editable.TextBoxEditor}});L.Editable.prototype.startTextBox=function(t,e){return this.startRectangle(null,L.extend({rectangleClass:L.TextBox},e))}},{}],4:[function(t,e,i){L.TextBox=L.Rectangle.extend({options:{padding:2,fontSize:12,fillOpacity:.5,fillColor:"#ffffff",weight:1,fontColor:"",fontFamily:"",ratio:1,text:"Please, add text"},initialize:function(t,e){L.Rectangle.prototype.initialize.call(this,t,e);this._text=this.options.text;this._textNode=null},setStyle:function(t){L.setOptions(this,t);if(this.editor&&this.editor._enabled){this.editor.updateStyle()}else{this._renderText()}},updateStyle:function(){var t=this._textNode;var e=this.options;if(null!==t){t.setAttribute("font-family",e.fontFamily);t.setAttribute("font-size",e.fontSize+"px");t.setAttribute("fill",e.fontColor)}},_renderText:function(){this._textNode=this._renderer.renderText(this);this._path.parentNode.insertBefore(this._textNode,this._path.nextSibling);this.updateStyle();this._updatePosition()},_updatePosition:function(){if(null!==this._textNode&&0!==this._rings.length){var t=this._rings[0][1];var e=new L.Matrix(1,0,0,1,0,0).translate(t).scale(this._getScale(this._map.getZoom()));this._textNode.setAttribute("transform","matrix("+e._matrix.join(" ")+")")}},_getScale:function(t){return this._map?Math.pow(2,t)*this.options.ratio:1},_updatePath:function(){L.Rectangle.prototype._updatePath.call(this);this._updatePosition()}})},{}],5:[function(t,e,i){L.DomUtil.setSize=L.DomUtil.setSize||function(t,e){t.style.width=e.x+"px";t.style.height=e.y+"px";return this}},{}]},{},[1])(1)});

@@ -5,2 +5,3 @@ /*eslint no-undef: "error"*/

var L = require('leaflet');
require('leaflet-editable');

@@ -12,2 +13,2 @@ require('leaflet-path-transform/src/Matrix');

module.exports = L.Editable.TextBox;
module.exports = L.Editable.TextBoxEditor;
{
"name": "leaflet-editable-textbox",
"version": "1.0.3",
"version": "1.0.4",
"description": "TextBox for Leaflet.Editable",
"main": "index.js",
"scripts": {
"postinstall": "rimraf ./node_modules/leaflet-editable/node_modules/leaflet",
"test": "echo \"Error: no test specified\" && exit 0",

@@ -27,2 +28,3 @@ "watch": "watchify -v -d -s L.Editable.Textbox ./demo/js/index.js -o ./demo/js/build.js",

"devDependencies": {
"rimraf": "*",
"leaflet-editable": "github:leaflet/leaflet.editable#gh-pages",

@@ -29,0 +31,0 @@ "babel-preset-es2015": "^6.3.13",

@@ -12,3 +12,2 @@ /**

/**

@@ -15,0 +14,0 @@ * @param {SVGElement} svg

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