[Libreoffice-commits] online.git: loleaflet/src

Henry Castro (via logerrit) logerrit at kemper.freedesktop.org
Mon Aug 3 22:32:22 UTC 2020


 loleaflet/src/control/Ruler.js |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 948e21a52d058f9d2a5826ff21bc755224cda587
Author:     Henry Castro <hcastro at collabora.com>
AuthorDate: Mon Aug 3 09:46:00 2020 -0400
Commit:     Henry Castro <hcastro at collabora.com>
CommitDate: Tue Aug 4 00:32:03 2020 +0200

    loleaflet: remove more unnecessary jquery dependency
    
    simplify and get rid of jquery dependency
    
    Change-Id: Iebdf641e24eb6bd4e2e9c4b8692febc1c49e97c6
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100005
    Tested-by: Jenkins
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Henry Castro <hcastro at collabora.com>

diff --git a/loleaflet/src/control/Ruler.js b/loleaflet/src/control/Ruler.js
index 9292cc225..bcca9e186 100644
--- a/loleaflet/src/control/Ruler.js
+++ b/loleaflet/src/control/Ruler.js
@@ -294,7 +294,9 @@ L.Control.Ruler = L.Control.extend({
 
 		var numCounter = -1 * parseInt(lMargin / 1000);
 
-		$('.loleaflet-ruler-maj').remove();
+		while (this._rBPContainer.hasChildNodes()) {
+			this._rBPContainer.removeChild(this._rBPContainer.lastChild);
+		}
 
 		// this.options.pageWidth is in mm100, so the code here makes one ruler division per
 		// centimetre.
@@ -317,11 +319,9 @@ L.Control.Ruler = L.Control.extend({
 
 		// The tabstops. Only draw user-created ones, with style RULER_TAB_LEFT,
 		// RULER_TAB_RIGHT, RULER_TAB_CENTER, and RULER_TAB_DECIMAL. See <svtools/ruler.hxx>.
-
-		$('.loleaflet-ruler-tabstop-left').remove();
-		$('.loleaflet-ruler-tabstop-right').remove();
-		$('.loleaflet-ruler-tabstop-center').remove();
-		$('.loleaflet-ruler-tabstop-decimal').remove();
+		while (this._rTSContainer.hasChildNodes()) {
+			this._rTSContainer.removeChild(this._rTSContainer.lastChild);
+		}
 
 		var pxPerMm100 = this._map._docLayer._docPixelSize.x / (this._map._docLayer._docWidthTwips * 2540/1440);
 		this._rTSContainer.tabStops = [];


More information about the Libreoffice-commits mailing list