Make sure all leaflet images are loaded through the asse pipeline
authorTom Hughes <tom@compton.nu>
Wed, 21 Nov 2012 19:01:09 +0000 (19:01 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 21 Nov 2012 19:01:09 +0000 (19:01 +0000)
app/assets/stylesheets/leaflet-all.css [deleted file]
app/assets/stylesheets/leaflet-all.css.scss [new file with mode: 0644]

diff --git a/app/assets/stylesheets/leaflet-all.css b/app/assets/stylesheets/leaflet-all.css
deleted file mode 100644 (file)
index 5270dd6..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- *= require leaflet
- *= require leaflet.locationfilter
- *= require leaflet.pan
- *= require leaflet.zoom
- */
-
-/* Override to better match the pan/zoom control. */
-.leaflet-control-layers {
-  box-shadow: 0px 0px 3px #666;
-  background: #fff;
-  border-radius: 3px;
-}
-
-/* Override some conflicting styles.
-   https://github.com/openstreetmap/openstreetmap-website/pull/121#issuecomment-10206946 */
-.leaflet-popup-content img.user_thumbnail {
-  max-width: 50px !important;
-}
-
-.user_popup p {
-  margin: 0px 2px 0px 55px !important;
-}
diff --git a/app/assets/stylesheets/leaflet-all.css.scss b/app/assets/stylesheets/leaflet-all.css.scss
new file mode 100644 (file)
index 0000000..3d9c381
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ *= require leaflet
+ *= require leaflet.locationfilter
+ *= require leaflet.pan
+ *= require leaflet.zoom
+ */
+
+/* Override to serve images through the asset pipeline. */
+.leaflet-control-zoom-in {
+  background-image: image-url("images/zoom-in.png");
+}
+
+.leaflet-control-zoom-out {
+  background-image: image-url("images/zoom-out.png");
+}
+
+.leaflet-control-layers-toggle {
+  background-image: image-url("images/layers.png");
+}
+
+div.leaflet-marker-icon.location-filter.resize-marker {
+  background-image: image-url("img/resize-handle.png");
+}
+
+div.leaflet-marker-icon.location-filter.move-marker {
+  background-image: image-url("img/move-handle.png");
+}
+
+/* Override to better match the pan/zoom control. */
+.leaflet-control-layers {
+  box-shadow: 0px 0px 3px #666;
+  background: #fff;
+  border-radius: 3px;
+}
+
+/* Override some conflicting styles.
+   https://github.com/openstreetmap/openstreetmap-website/pull/121#issuecomment-10206946 */
+.leaflet-popup-content img.user_thumbnail {
+  max-width: 50px !important;
+}
+
+.user_popup p {
+  margin: 0px 2px 0px 55px !important;
+}