From 459d653a3fd2372f12be98308b573b03aad5a067 Mon Sep 17 00:00:00 2001 From: Kristjan SCHMIDT <35647502+KristjanESPERANTO@users.noreply.github.com> Date: Fri, 20 Nov 2020 22:38:34 +0100 Subject: [PATCH 1/8] Replace PNG with SVG file --- Control.Geocoder.css | 2 +- bower.json | 2 +- images/geocoder.png | Bin 490 -> 0 bytes images/geocoder.svg | 1 + 4 files changed, 3 insertions(+), 2 deletions(-) delete mode 100644 images/geocoder.png create mode 100644 images/geocoder.svg diff --git a/Control.Geocoder.css b/Control.Geocoder.css index 00c32255..514efb27 100644 --- a/Control.Geocoder.css +++ b/Control.Geocoder.css @@ -48,7 +48,7 @@ height: 26px; border: none; background-color: white; - background-image: url(images/geocoder.png); + background-image: url(images/geocoder.svg); background-repeat: no-repeat; background-position: center; cursor: pointer; diff --git a/bower.json b/bower.json index f4b28ede..8a5c3756 100755 --- a/bower.json +++ b/bower.json @@ -7,7 +7,7 @@ "main": [ "dist/Control.Geocoder.js", "dist/Control.Geocoder.css", - "images/geocoder.png", + "images/geocoder.svg", "images/throbber.gif" ], "moduleType": ["amd", "globals"], diff --git a/images/geocoder.png b/images/geocoder.png deleted file mode 100644 index d82a0170e62ccacac814cef91bbefdacc62071ca..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 490 zcmeAS@N?(olHy`uVBq!ia0vp^QXtI13?%1G+4BcToe%H{aRt&UDk^GVpsK10WCKOC zw6q|C#>U1FL7+U40VFjvG$4xA)zyIvpkfFYC@U!`2~h(S0W#ohU0q#>2#^Hol97>t zYf(~Cg0LY9fR+MvDJv`M>FL4MfK5_`SOjDP9RLwQQvehMifrinc@wDAr6kBNn8Eei zhkJ(1Y;ONpSNo=%-YWU=81EIv1wTG<9iA^@+w^CPVAhJsp`1Mhkz$XY)V_{Nx8znl znebo^)4DUpKX-f$`*o|*yFi5ZJJ7r~PZ!4!3CXhuU74B<7+4OtGMAPE!Oj2sSAOw2 zG*`04Z*AVqfRkafpRD1JR5=`$ZdZDI!jYQ{28QCyKU6O>%@Z~Kp<49g@{X4HEjQYp zA2$7y^oHwz(LFO2R=K|C()%Yobyti3-u|!U)Uy`uUfnC}tjd|Ps*5@pY From 777fb80a7832fe9aca6c62bc8614ae80991a14e3 Mon Sep 17 00:00:00 2001 From: Kristjan SCHMIDT <35647502+KristjanESPERANTO@users.noreply.github.com> Date: Sat, 21 Nov 2020 03:00:55 +0100 Subject: [PATCH 2/8] Replaced GIF with SVG --- Control.Geocoder.css | 2 +- bower.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Control.Geocoder.css b/Control.Geocoder.css index 514efb27..fc32417c 100644 --- a/Control.Geocoder.css +++ b/Control.Geocoder.css @@ -60,7 +60,7 @@ } .leaflet-control-geocoder-throbber .leaflet-control-geocoder-icon { - background-image: url(images/throbber.gif); + background-image: url(images/throbber.svg); } .leaflet-control-geocoder-form-no-error { diff --git a/bower.json b/bower.json index 8a5c3756..5973c640 100755 --- a/bower.json +++ b/bower.json @@ -8,7 +8,7 @@ "dist/Control.Geocoder.js", "dist/Control.Geocoder.css", "images/geocoder.svg", - "images/throbber.gif" + "images/throbber.svg" ], "moduleType": ["amd", "globals"], "keywords": [ From fcc577b4a02f5940fe3f04ec88adad109e224a0f Mon Sep 17 00:00:00 2001 From: Kristjan SCHMIDT <35647502+KristjanESPERANTO@users.noreply.github.com> Date: Sat, 21 Nov 2020 20:31:57 +0100 Subject: [PATCH 3/8] Replace PNG with SVG file --- images/throbber.gif | Bin 4831 -> 0 bytes images/throbber.svg | 1 + 2 files changed, 1 insertion(+) delete mode 100644 images/throbber.gif create mode 100644 images/throbber.svg diff --git a/images/throbber.gif b/images/throbber.gif deleted file mode 100644 index c0c52a06c09d98bb75d1c3f9945f3101ab094f98..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4831 zcmeH}`BxHX+s6?>5EM~RQAxoCae>^oGFcTB6qI&NQOu=uT&S$aDM7&9a4k(!ky4vB z+qF#v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^ROq)82=ruXNK|A0(P6Lq=1g6h)c=lLK-bzgI|rtiHL6t8`;Pw8bhB%c!@um61_0js-e&c`r@7nL0PeZ zEB}t`7b(ZyR8DCZygOgg!i7zaIM8-Iu5WFaV$bXe*_5@ \ No newline at end of file From 82c2a37280b5f49cef52afcbca7808828cb633a1 Mon Sep 17 00:00:00 2001 From: Kristjan SCHMIDT <35647502+KristjanESPERANTO@users.noreply.github.com> Date: Sat, 21 Nov 2020 22:22:40 +0100 Subject: [PATCH 4/8] Replaces SVG files with Data URIs --- Control.Geocoder.css | 9 +++++++-- images/geocoder.svg | 1 - images/throbber.svg | 1 - 3 files changed, 7 insertions(+), 4 deletions(-) delete mode 100644 images/geocoder.svg delete mode 100644 images/throbber.svg diff --git a/Control.Geocoder.css b/Control.Geocoder.css index fc32417c..00fec7f6 100644 --- a/Control.Geocoder.css +++ b/Control.Geocoder.css @@ -1,3 +1,8 @@ +:root { + --magnifier: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12.2 13l3.4 6.6c.6 1.1 2.5-.4 2-1.2l-4-6.2z'/%3E%3Ccircle cx='10.8' cy='8.9' r='3.9' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E"); + --throbber: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' stroke='%23000' stroke-linecap='round' stroke-width='1.6' viewBox='0 0 24 24'%3E%3Cdefs/%3E%3Cg%3E%3Cpath stroke-opacity='.1' d='M14 8.4l3-5'/%3E%3Cpath stroke-opacity='.2' d='M15.6 10l5-3'/%3E%3Cpath stroke-opacity='.3' d='M16.2 12H22'/%3E%3Cpath stroke-opacity='.4' d='M15.6 14l5 3m-6.5-1.4l2.9 5'/%3E%3Cpath stroke-opacity='.5' d='M12 16.2V22m-2-6.4l-3 5'/%3E%3Cpath stroke-opacity='.6' d='M8.4 14l-5 3'/%3E%3Cpath stroke-opacity='.7' d='M7.8 12H2'/%3E%3Cpath stroke-opacity='.8' d='M8.4 10l-5-3'/%3E%3Cpath stroke-opacity='.9' d='M10 8.4l-3-5'/%3E%3Cpath d='M12 7.8V2'/%3E%3CanimateTransform attributeName='transform' calcMode='discrete' dur='1s' repeatCount='indefinite' type='rotate' values='0 12 12;30 12 12;60 12 12;90 12 12;120 12 12;150 12 12;180 12 12;210 12 12;240 12 12;270 12 12;300 12 12;330 12 12'/%3E%3C/g%3E%3C/svg%3E"); +} + .leaflet-control-geocoder { border-radius: 4px; background: white; @@ -48,7 +53,7 @@ height: 26px; border: none; background-color: white; - background-image: url(images/geocoder.svg); + background-image: var(--magnifier); background-repeat: no-repeat; background-position: center; cursor: pointer; @@ -60,7 +65,7 @@ } .leaflet-control-geocoder-throbber .leaflet-control-geocoder-icon { - background-image: url(images/throbber.svg); + background-image: var(--throbber); } .leaflet-control-geocoder-form-no-error { diff --git a/images/geocoder.svg b/images/geocoder.svg deleted file mode 100644 index 0c190cfd..00000000 --- a/images/geocoder.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/images/throbber.svg b/images/throbber.svg deleted file mode 100644 index 24b23b45..00000000 --- a/images/throbber.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file From fd2f7ecb954069eacc8d34328994e11adcdf643a Mon Sep 17 00:00:00 2001 From: Kristjan <35647502+KristjanESPERANTO@users.noreply.github.com> Date: Sat, 21 Nov 2020 22:27:33 +0100 Subject: [PATCH 5/8] Replaced SVG files with Data URIs --- bower.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bower.json b/bower.json index 5973c640..3c448898 100755 --- a/bower.json +++ b/bower.json @@ -6,9 +6,7 @@ "description": "Extendable geocoder with builtin OSM/Nominatim support", "main": [ "dist/Control.Geocoder.js", - "dist/Control.Geocoder.css", - "images/geocoder.svg", - "images/throbber.svg" + "dist/Control.Geocoder.css" ], "moduleType": ["amd", "globals"], "keywords": [ From a4fdb08e30dae163dbd9f96e75897a621f83bc92 Mon Sep 17 00:00:00 2001 From: Kristjan SCHMIDT <35647502+KristjanESPERANTO@users.noreply.github.com> Date: Sat, 21 Nov 2020 23:44:05 +0100 Subject: [PATCH 6/8] url directly on background-image for IE11 --- Control.Geocoder.css | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Control.Geocoder.css b/Control.Geocoder.css index 00fec7f6..4d300162 100644 --- a/Control.Geocoder.css +++ b/Control.Geocoder.css @@ -1,8 +1,3 @@ -:root { - --magnifier: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12.2 13l3.4 6.6c.6 1.1 2.5-.4 2-1.2l-4-6.2z'/%3E%3Ccircle cx='10.8' cy='8.9' r='3.9' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E"); - --throbber: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' stroke='%23000' stroke-linecap='round' stroke-width='1.6' viewBox='0 0 24 24'%3E%3Cdefs/%3E%3Cg%3E%3Cpath stroke-opacity='.1' d='M14 8.4l3-5'/%3E%3Cpath stroke-opacity='.2' d='M15.6 10l5-3'/%3E%3Cpath stroke-opacity='.3' d='M16.2 12H22'/%3E%3Cpath stroke-opacity='.4' d='M15.6 14l5 3m-6.5-1.4l2.9 5'/%3E%3Cpath stroke-opacity='.5' d='M12 16.2V22m-2-6.4l-3 5'/%3E%3Cpath stroke-opacity='.6' d='M8.4 14l-5 3'/%3E%3Cpath stroke-opacity='.7' d='M7.8 12H2'/%3E%3Cpath stroke-opacity='.8' d='M8.4 10l-5-3'/%3E%3Cpath stroke-opacity='.9' d='M10 8.4l-3-5'/%3E%3Cpath d='M12 7.8V2'/%3E%3CanimateTransform attributeName='transform' calcMode='discrete' dur='1s' repeatCount='indefinite' type='rotate' values='0 12 12;30 12 12;60 12 12;90 12 12;120 12 12;150 12 12;180 12 12;210 12 12;240 12 12;270 12 12;300 12 12;330 12 12'/%3E%3C/g%3E%3C/svg%3E"); -} - .leaflet-control-geocoder { border-radius: 4px; background: white; @@ -53,7 +48,7 @@ height: 26px; border: none; background-color: white; - background-image: var(--magnifier); + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12.2 13l3.4 6.6c.6 1.1 2.5-.4 2-1.2l-4-6.2z'/%3E%3Ccircle cx='10.8' cy='8.9' r='3.9' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; cursor: pointer; @@ -65,7 +60,7 @@ } .leaflet-control-geocoder-throbber .leaflet-control-geocoder-icon { - background-image: var(--throbber); + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' stroke='%23000' stroke-linecap='round' stroke-width='1.6' viewBox='0 0 24 24'%3E%3Cdefs/%3E%3Cg%3E%3Cpath stroke-opacity='.1' d='M14 8.4l3-5'/%3E%3Cpath stroke-opacity='.2' d='M15.6 10l5-3'/%3E%3Cpath stroke-opacity='.3' d='M16.2 12H22'/%3E%3Cpath stroke-opacity='.4' d='M15.6 14l5 3m-6.5-1.4l2.9 5'/%3E%3Cpath stroke-opacity='.5' d='M12 16.2V22m-2-6.4l-3 5'/%3E%3Cpath stroke-opacity='.6' d='M8.4 14l-5 3'/%3E%3Cpath stroke-opacity='.7' d='M7.8 12H2'/%3E%3Cpath stroke-opacity='.8' d='M8.4 10l-5-3'/%3E%3Cpath stroke-opacity='.9' d='M10 8.4l-3-5'/%3E%3Cpath d='M12 7.8V2'/%3E%3CanimateTransform attributeName='transform' calcMode='discrete' dur='1s' repeatCount='indefinite' type='rotate' values='0 12 12;30 12 12;60 12 12;90 12 12;120 12 12;150 12 12;180 12 12;210 12 12;240 12 12;270 12 12;300 12 12;330 12 12'/%3E%3C/g%3E%3C/svg%3E"); } .leaflet-control-geocoder-form-no-error { From 71132e2af5ea887e0f52bd377889446ef081ddd9 Mon Sep 17 00:00:00 2001 From: Kristjan <35647502+KristjanESPERANTO@users.noreply.github.com> Date: Sat, 21 Nov 2020 23:56:20 +0100 Subject: [PATCH 7/8] There are no images anymore --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index ad793096..e0b1e3fb 100644 --- a/package.json +++ b/package.json @@ -6,10 +6,9 @@ "module": "src/index.js", "scripts": { "prepare": "npm run build", - "build": "npm run build:js && npm run build:css && npm run build:img && npm run build:demo-esbuild && npm run build:demo-rollup && npm run build:demo-webpack", + "build": "npm run build:js && npm run build:css && npm run build:demo-esbuild && npm run build:demo-rollup && npm run build:demo-webpack", "build:js": "rollup -c", "build:css": "cpr Control.Geocoder.css dist/Control.Geocoder.css --overwrite", - "build:img": "cpr images/ dist/images/ --overwrite", "build:demo-esbuild": "cd demo-esbuild && npm install && npm run build", "build:demo-rollup": "cd demo-rollup && npm install && npm run build", "build:demo-webpack": "cd demo-rollup && npm install && npm run build", From 5fd77ef6b5d8e153580691586d144b2d950ccbd8 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sun, 22 Nov 2020 09:24:35 +0100 Subject: [PATCH 8/8] Update bower.json --- bower.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/bower.json b/bower.json index 3c448898..ba09bb32 100755 --- a/bower.json +++ b/bower.json @@ -4,10 +4,7 @@ "homepage": "https://github.com/perliedman/leaflet-control-geocoder", "authors": ["Per Liedman "], "description": "Extendable geocoder with builtin OSM/Nominatim support", - "main": [ - "dist/Control.Geocoder.js", - "dist/Control.Geocoder.css" - ], + "main": ["dist/Control.Geocoder.js", "dist/Control.Geocoder.css"], "moduleType": ["amd", "globals"], "keywords": [ "leaflet",