Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

re jigger sizes

  • Loading branch information...
commit a129ff24c0d157d610058dfdb32fde5498aa3c48 1 parent be07c26
@calvinmetcalf calvinmetcalf authored
View
8 dist/leaflet.sprite.js
@@ -37,8 +37,12 @@
cssRegular = ".leaflet-sprite{background:url(" + sprite + ") no-repeat top left;}\n.leaflet-sprite-blue{ background-position: 0 -132px; width: 41px; height: 41px; } \n.leaflet-sprite-green{ background-position: 0 -355px; width: 41px; height: 41px; } \n.leaflet-sprite-orange{ background-position: 0 -578px; width: 41px; height: 41px; } \n.leaflet-sprite-purple{ background-position: 0 -801px; width: 41px; height: 41px; } \n.leaflet-sprite-red{ background-position: 0 -1024px; width: 41px; height: 41px; } \n.leaflet-sprite-violet{ background-position: 0 -1247px; width: 41px; height: 41px; } \n.leaflet-sprite-yellow{ background-position: 0 -1470px; width: 41px; height: 41px; } ";
- cssRetina = ".leaflet-sprite{\nbackground:url(" + sprite + ") no-repeat top left;\nbackground-size:41px, 41px\n}\n .leaflet-sprite-blue{ background-position: 0 0; width: 82px; height: 82px; } \n .leaflet-sprite-green{ background-position: 0 -111px; width: 82px; height: 82px; } \n .leaflet-sprite-orange{ background-position: 0 -223px; width: 82px; height: 82px; } \n .leaflet-sprite-purple{ background-position: 0 -334px; width: 82px; height: 82px; } \n .leaflet-sprite-red{ background-position: 0 -446px; width: 82px; height: 82px; } \n .leaflet-sprite-violet{ background-position: 0 -557px; width: 82px; height: 82px; } \n .leaflet-sprite-yellow{ background-position: 0 -669px; width: 82px; height: 82px; } ";
+ cssRetina = ".leaflet-sprite{\nbackground:url(" + sprite + ") no-repeat top left;\nbackground-size:41px, 41px\n}\n .leaflet-sprite-blue{ background-position: 0 0; width: 41px; height: 41px; } \n .leaflet-sprite-green{ background-position: 0 -111px; width: 41px; height: 41px; } \n .leaflet-sprite-orange{ background-position: 0 -223px; width: 41px; height: 41px; } \n .leaflet-sprite-purple{ background-position: 0 -334px; width: 41px; height: 41px; } \n .leaflet-sprite-red{ background-position: 0 -446px; width: 41px; height: 41px; } \n .leaflet-sprite-violet{ background-position: 0 -557px; width: 41px; height: 41px; } \n .leaflet-sprite-yellow{ background-position: 0 -669px; width: 41px; height: 41px; } ";
- L.css([cssRegular]);
+ if (L.Browser.retina) {
+ L.css([cssRetina]);
+ } else {
+ L.css([cssRegular]);
+ }
}).call(this);
View
4 dist/leaflet.sprite.min.js
2 additions, 2 deletions not shown
View
22 src/sprite.coffee
@@ -24,16 +24,16 @@ cssRetina = """.leaflet-sprite{
background:url(#{sprite}) no-repeat top left;
background-size:41px, 41px
}
- .leaflet-sprite-blue{ background-position: 0 0; width: 82px; height: 82px; }
- .leaflet-sprite-green{ background-position: 0 -111px; width: 82px; height: 82px; }
- .leaflet-sprite-orange{ background-position: 0 -223px; width: 82px; height: 82px; }
- .leaflet-sprite-purple{ background-position: 0 -334px; width: 82px; height: 82px; }
- .leaflet-sprite-red{ background-position: 0 -446px; width: 82px; height: 82px; }
- .leaflet-sprite-violet{ background-position: 0 -557px; width: 82px; height: 82px; }
- .leaflet-sprite-yellow{ background-position: 0 -669px; width: 82px; height: 82px; }
+ .leaflet-sprite-blue{ background-position: 0 0; width: 41px; height: 41px; }
+ .leaflet-sprite-green{ background-position: 0 -111px; width: 41px; height: 41px; }
+ .leaflet-sprite-orange{ background-position: 0 -223px; width: 41px; height: 41px; }
+ .leaflet-sprite-purple{ background-position: 0 -334px; width: 41px; height: 41px; }
+ .leaflet-sprite-red{ background-position: 0 -446px; width: 41px; height: 41px; }
+ .leaflet-sprite-violet{ background-position: 0 -557px; width: 41px; height: 41px; }
+ .leaflet-sprite-yellow{ background-position: 0 -669px; width: 41px; height: 41px; }
"""
-#if L.Browser.retina
-# L.css([cssRetina])
-#else
-L.css([cssRegular])
+if L.Browser.retina
+ L.css([cssRetina])
+else
+ L.css([cssRegular])
Please sign in to comment.
Something went wrong with that request. Please try again.