Upsize svg identicons
The chrome.notifications api renders iconUrls at full bleed, as opposed to the Web Notifications api, which adds padding. This was causing our identicons to look a bit over stretched. Fixed by rendering them a bit larger and with some padding. // FREEBIE
This commit is contained in:
parent
1a30d003f5
commit
e80fa187ba
2 changed files with 4 additions and 4 deletions
|
@ -88,9 +88,9 @@
|
|||
</div>
|
||||
</script>
|
||||
<script type='text/x-tmpl-mustache' id='identicon-svg'>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="44" height="44">
|
||||
<circle cx="22" cy="22" r="22" fill="{{ color }}" />
|
||||
<text text-anchor="middle" fill="white" font-size="14px" x="22" y="22" baseline-shift="-4px">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100">
|
||||
<circle cx="50" cy="50" r="40" fill="{{ color }}" />
|
||||
<text text-anchor="middle" fill="white" font-size="24px" x="50" y="50" baseline-shift="-8px">
|
||||
{{ content }}
|
||||
</text>
|
||||
</svg>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
var img = document.createElement('img');
|
||||
img.onload = function () {
|
||||
var canvas = loadImage.scale(img, {
|
||||
canvas: true, maxWidth: 44, maxHeight: 44
|
||||
canvas: true, maxWidth: 100, maxHeight: 100
|
||||
});
|
||||
var ctx = canvas.getContext('2d');
|
||||
ctx.drawImage(img, 0, 0);
|
||||
|
|
Loading…
Reference in a new issue