Insert 'no insignia' text for ranks without rank insignia

master
lwood1 2016-05-31 07:58:47 +00:00
parent 5a9385839c
commit 2928f4d384
2 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,12 @@
DDH.military_rank = DDH.military_rank || {};
var no_insignia_svg = DDG.get_asset_path('military_rank', 'no_insignia.svg');
no_insignia_svg = no_insignia_svg.replace(/spice/, 'goodie')
DDH.military_rank.build = function(ops) {
return {
normalize: function(item) {
return {
image: item.image.length == 0 ? no_insignia_svg : item.image
};
}
};
};

View File

@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" height="80" width="80">
<text x="40" y="32" font-family="Helvetica" font-size="16" text-anchor="middle">No</text>
<text x="40" y="56" font-family="Helvetica" font-size="16" text-anchor="middle">Insignia</text>
</svg>

After

Width:  |  Height:  |  Size: 264 B