loleaflet/Makefile.am | 11 ++--------- loleaflet/src/layer/marker/Cursor.js | 16 ---------------- loleaflet/src/map/Map.js | 4 ++-- 3 files changed, 4 insertions(+), 27 deletions(-)
New commits: commit 50dd72d34f484dfc19e3b40410beba283f88c664 Author: Henry Castro <[email protected]> Date: Thu May 24 14:44:04 2018 -0400 loleaflet: move cursors to images directory Change-Id: Iea2f5753da022fec70d17fd325764cc46b371483 diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am index 9e2638a58..bd5fc2a0a 100644 --- a/loleaflet/Makefile.am +++ b/loleaflet/Makefile.am @@ -15,7 +15,7 @@ JQUERY_UI_IMAGE_PATH = node_modules/jquery-ui/themes/ui-lightness/images JQUERY_UI_IMAGES = $(wildcard $(JQUERY_UI_IMAGE_PATH)/*.png) JQUERY_UI_DIST_IMAGES = $(patsubst $(JQUERY_UI_IMAGE_PATH)/%.png,$(builddir)/dist/images/%.png,$(JQUERY_UI_IMAGES)) -LOLEAFLET_IMAGES_SRC = $(wildcard $(srcdir)/images/*) +LOLEAFLET_IMAGES_SRC = $(shell find $(srcdir)/images -name '*.*') LOLEAFLET_IMAGES_DST = $(patsubst $(srcdir)/%,$(builddir)/dist/%,$(LOLEAFLET_IMAGES_SRC)) LOLEAFLET_L10N_SRC = $(shell find $(srcdir)/l10n -name '*.*') @@ -35,9 +35,6 @@ LOLEAFLET_ADMIN_DST = $(patsubst $(srcdir)/admin/%,$(builddir)/dist/admin/%,$(LO BOOTSTRAP_SRC = $(shell find $(srcdir)/bootstrap -name '*.*') BOOTSTRAP_DST = $(patsubst $(srcdir)/bootstrap/%,$(builddir)/dist/bootstrap/%,$(BOOTSTRAP_SRC)) -CURSORS_SRC = $(shell find $(srcdir)/cursors -name '*.*') -CURSORS_DST = $(patsubst $(srcdir)/cursors/%,$(builddir)/dist/cursors/%,$(CURSORS_SRC)) - define file_target $(1): $(2) @cp $$< $$@ @@ -131,7 +128,7 @@ all-local: | node_modules \ $(builddir)/dist/loleaflet.html @echo "build loleaflet completed" -$(builddir)/dist/admin-bundle.js: $(LOLEAFLET_ADMIN_DST) $(BOOTSTRAP_DST) $(CURSORS_DST) +$(builddir)/dist/admin-bundle.js: $(LOLEAFLET_ADMIN_DST) $(BOOTSTRAP_DST) @NODE_PATH=$(abs_builddir)/node_modules jake -f $(srcdir)/Jakefile.js -C $(srcdir) $(abs_builddir)/dist/admin-bundle.js debug=$(ENABLE_DEBUG) minify=$(MINIFY) builddir=$(abs_builddir) if ENABLE_DEBUG @@ -247,10 +244,6 @@ $(builddir)/dist/bootstrap/%: $(srcdir)/bootstrap/% @mkdir -p $(dir $@) @cp $< $@ -$(builddir)/dist/cursors/%: $(srcdir)/cursors/% - @mkdir -p $(dir $@) - @cp $< $@ - install-data-hook: mkdir -p $(DESTDIR)$(pkgdatadir)/loleaflet; \ cp -ar dist/ $(DESTDIR)$(pkgdatadir)/loleaflet/; diff --git a/loleaflet/cursors/fill.cur b/loleaflet/images/cursors/fill.cur similarity index 100% rename from loleaflet/cursors/fill.cur rename to loleaflet/images/cursors/fill.cur diff --git a/loleaflet/cursors/fill.png b/loleaflet/images/cursors/fill.png similarity index 100% rename from loleaflet/cursors/fill.png rename to loleaflet/images/cursors/fill.png diff --git a/loleaflet/src/layer/marker/Cursor.js b/loleaflet/src/layer/marker/Cursor.js index 8be48906f..35e68ff41 100644 --- a/loleaflet/src/layer/marker/Cursor.js +++ b/loleaflet/src/layer/marker/Cursor.js @@ -123,22 +123,6 @@ L.cursor = function (latlng, size, options) { return new L.Cursor(latlng, size, options); }; -L.Cursor.getCursorURL = function (localPath) { - var scripts = document.getElementsByTagName('script'), - leafletRe = /[\/^]leaflet[\-\._]?([\w\-\._]*)\.js\??/; - - var i, len, src, path; - - for (i = 0, len = scripts.length; i < len; i++) { - src = scripts[i].src; - - if (src.match(leafletRe)) { - path = src.split(leafletRe)[0]; - return (path ? path + '/' : '') + localPath; - } - } -}; - L.Cursor.hotSpot = { fill: {x: 7, y: 16} }; diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js index ccfd0ec10..425c9df24 100644 --- a/loleaflet/src/map/Map.js +++ b/loleaflet/src/map/Map.js @@ -20,7 +20,7 @@ L.Map = L.Evented.extend({ tileHeightTwips: 3840, urlPrefix: 'lool', wopiSrc: '', - cursorURL: 'cursors' + cursorURL: 'images/cursors' }, lastActiveTime: Date.now(), @@ -53,7 +53,7 @@ L.Map = L.Evented.extend({ this.setView(L.latLng(options.center), options.zoom, {reset: true}); } - L.Cursor.imagePath = options.cursorURL || L.Cursor.getCursorURL('cursors'); + L.Cursor.imagePath = options.cursorURL; if (options.webserver === undefined) { var protocol = window.location.protocol === 'file:' ? 'https:' : window.location.protocol; _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
