@arunawalpola/leaflet.polylinemeasure 1.0.0 → 1.0.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.
@@ -759,17 +759,19 @@
759
759
  var textCurrent = '';
760
760
  if (differenceRound.value > 0 ) {
761
761
  if (this.options.showBearings === true) {
762
- textCurrent = this.options.bearingTextIn + ': ' + angleIn + '°<br>'+this.options.bearingTextOut+':---°';
762
+ //textCurrent = this.options.bearingTextIn + ': ' + angleIn + '°<br>'+this.options.bearingTextOut+':---°';
763
+ textCurrent = this.options.bearingTextIn + '' + angleIn + '°';
763
764
  }
764
765
  textCurrent += '<div class="polyline-measure-tooltip-difference">+' + differenceRound.value + '&nbsp;' + differenceRound.unit + '</div>';
765
766
  }
766
- textCurrent += '<div class="polyline-measure-tooltip-total">' + totalRound.value + '&nbsp;' + totalRound.unit + '</div>';
767
+ //textCurrent += '<div class="polyline-measure-tooltip-total">' + totalRound.value + '&nbsp;' + totalRound.unit + '</div>';
767
768
  currentTooltip._icon.innerHTML = textCurrent;
768
769
  if ((this.options.showBearings === true) && (prevTooltip)) {
769
- var textPrev = prevTooltip._icon.innerHTML;
770
- var regExp = new RegExp(this.options.bearingTextOut + '.*\°');
771
- var textReplace = textPrev.replace(regExp, this.options.bearingTextOut + ': ' + angleOut + "°");
772
- prevTooltip._icon.innerHTML = textReplace;
770
+ // var textPrev = prevTooltip._icon.innerHTML;
771
+ // var regExp = new RegExp(this.options.bearingTextOut + '.*\°');
772
+ // var textReplace = textPrev.replace(regExp, this.options.bearingTextOut + ': ' + angleOut + "°");
773
+ // prevTooltip._icon.innerHTML = textReplace;
774
+ prevTooltip._icon.innerHTML = '';
773
775
  }
774
776
  },
775
777
 
@@ -800,10 +802,10 @@
800
802
  html : "<div style = 'color:" + this.options.arrow.color + "; font-size: 16px; line-height: 16px; vertical-align:top; transform: rotate("+ cssAngle +"deg)'>&#x27a4;</div>" // best results if iconSize = font-size = line-height and iconAnchor font-size/2 .both values needed to position symbol in center of L.divIcon for all font-sizes.
801
803
  });
802
804
  var newArrowMarker = L.marker (center, {icon: iconArrow, zIndexOffset:-50}).addTo(this._layerPaint); // zIndexOffset to draw arrows below tooltips
803
- if (!this._currentLine){ // just bind tooltip if not drawing line anymore, cause following the instruction of tooltip is just possible when not drawing a line
804
- newArrowMarker.bindTooltip (this.options.tooltipTextAdd, {direction:'top', opacity:0.7, className:'polyline-measure-popupTooltip'});
805
- }
806
- newArrowMarker.on ('click', this._clickedArrow, this);
805
+ // if (!this._currentLine){ // just bind tooltip if not drawing line anymore, cause following the instruction of tooltip is just possible when not drawing a line
806
+ // newArrowMarker.bindTooltip (this.options.tooltipTextAdd, {direction:'top', opacity:0.7, className:'polyline-measure-popupTooltip'});
807
+ // }
808
+ // newArrowMarker.on ('click', this._clickedArrow, this);
807
809
  return newArrowMarker;
808
810
  },
809
811
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arunawalpola/leaflet.polylinemeasure",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Leaflet Plugin to measure distances of simple lines as well as of complex polylines",
5
5
  "main": "Leaflet.PolylineMeasure.js",
6
6
  "scripts": {