savagery 0.4.4 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/savagery/ember.js +2 -6
- data/lib/savagery/spriter.rb +1 -1
- data/lib/savagery/version.rb +1 -1
- data/spec/support/svgs.svg +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f4b4df0b64f3c16e8f0360e06487c503dd46801
|
4
|
+
data.tar.gz: 1109e5be39b0b83df68cd7ff2e295244b21e4c5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40faf0e88229a9236b18d69201e10f0becf7b9a591f57602911add25688aeaf6aa5cd78ec35a0e42b5743bb0ac943ee1f4b26a0762a343c5d66ddddb1e5be2d0
|
7
|
+
data.tar.gz: 3382127d0727c26a8c97c7f20d4dfb0a7eb29c9b6d93154ae6d61e77db386cc76ea889b64b524ac4629fb67b6a2dd591bdff3c27271cccb90f7c25f6371aebbd
|
@@ -2,10 +2,8 @@
|
|
2
2
|
|
3
3
|
Savagery = {
|
4
4
|
svgSpriteInclude: function(name) {
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
path = window.ASSETS.path(name + ".svg")
|
5
|
+
var path = window.ASSETS.path(name + ".svg")
|
6
|
+
if($("[data-savagery-path='" + path.split("/assets/").reverse()[0] + "']").length > 0) { return; }
|
9
7
|
$.get(path, function(data) {
|
10
8
|
$("body").prepend(data);
|
11
9
|
}, "text");
|
@@ -18,8 +16,6 @@ Savagery = {
|
|
18
16
|
absolutePath = absolutePath + "#" + basename;
|
19
17
|
return '<svg class="' + cssClass + '"><use xlink:href="' + absolutePath + '"></use></svg>';
|
20
18
|
},
|
21
|
-
|
22
|
-
_svgSpritesIncluded: {},
|
23
19
|
};
|
24
20
|
|
25
21
|
Ember.Application.initializer({
|
data/lib/savagery/spriter.rb
CHANGED
@@ -19,7 +19,7 @@ module Savagery
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def sprite
|
22
|
-
%(<svg style="display: none"><defs>\n\n#{symbols.join("\n")}\n</defs></svg>\n)
|
22
|
+
%(<svg data-savagery-path="#{sprite_path.split("/assets/svgs/").last}" style="display: none"><defs>\n\n#{symbols.join("\n")}\n</defs></svg>\n)
|
23
23
|
end
|
24
24
|
|
25
25
|
def symbols
|
data/lib/savagery/version.rb
CHANGED
data/spec/support/svgs.svg
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
<svg style="display: none"><defs>
|
1
|
+
<svg data-savagery-path="tmp/svgs.svg" style="display: none"><defs>
|
2
2
|
|
3
3
|
<symbol id="callout1"><g opacity="0.6">
|
4
4
|
<path fill="#C2DFF5" d="M945.959,12.514c-2.913-1.25-7.968-1.442-12.753-1.714C936.875,12.009,940.785,12.569,945.959,12.514z"/>
|