SpeciesFileGroup/taxonworks

View on GitHub
app/javascript/vue/components/ui/VGraph/svg/person.js

Summary

Maintainability
A
0 mins
Test Coverage
export function person({ color }, { size }) {
  const group = document.createElementNS('http://www.w3.org/2000/svg', 'g')

  group.setAttribute('width', size)
  group.setAttribute('height', size)

  group.setAttribute('transform', `translate(-${size}, -${size})`)

  group.innerHTML = `
      <path
        fill="transparent"
        stroke-width="0"
        d="M5.3,12.5C2.1,9.6,2.2,4.9,4.9,2.2c2.7-2.8,7-2.9,9.9-0.3c2.9,2.6,3.3,7.5-0.1,10.6c0.7,0.3,1.3,0.6,1.9,0.9
        c1.7,0.7,2.6,2.1,3.1,3.8C20,18.1,20,19,20,19.9c0,0.1,0,0.2-0.1,0.3c-2.1,2.3-4.7,3.9-7.9,4.3C8.3,25.1,5,24.2,2,22
        c-0.7-0.5-1.2-1.1-1.8-1.7C0.1,20.2,0,20.1,0,20c-0.1-2.1,0.3-4,1.8-5.6c0.4-0.4,0.9-0.7,1.4-1C3.9,13.1,4.6,12.8,5.3,12.5z
        M13.4,13.4c-2.3,1.1-4.5,1.1-6.8,0c-0.1,0.1-0.2,0.1-0.3,0.2c-0.8,0.4-1.6,0.8-2.4,1.1c-0.8,0.4-1.4,0.9-1.8,1.7
        c-0.5,0.9-0.7,2-0.7,3c0,0.1,0.1,0.2,0.1,0.3c2.7,2.7,6,4,9.8,3.6c2.8-0.3,5.1-1.6,7.1-3.5c0.1-0.1,0.2-0.3,0.2-0.4
        c-0.1-0.7-0.1-1.4-0.3-2.1c-0.3-1.2-1.1-2.1-2.2-2.6c-0.8-0.3-1.5-0.7-2.3-1.1C13.6,13.5,13.5,13.4,13.4,13.4z M10,1.4
        C6.8,1.4,4.3,4,4.3,7.1c0,3.1,2.6,5.7,5.7,5.7c3.1,0,5.7-2.5,5.7-5.7C15.7,4,13.1,1.4,10,1.4z"></path>
      <path
        fill="${color}"
        d="M13.4,13.4c0.1,0.1,0.2,0.2,0.3,0.2c0.8,0.4,1.5,0.8,2.3,1.1c1.2,0.5,1.9,1.4,2.2,2.6c0.2,0.7,0.2,1.4,0.3,2.1
        c0,0.1-0.1,0.3-0.2,0.4c-2,2-4.3,3.2-7.1,3.5c-3.8,0.4-7.1-0.9-9.8-3.6c-0.1-0.1-0.1-0.2-0.1-0.3c0-1.1,0.2-2.1,0.7-3
        c0.4-0.8,1-1.3,1.8-1.7c0.8-0.4,1.6-0.8,2.4-1.1c0.1-0.1,0.2-0.1,0.3-0.2C8.9,14.5,11.1,14.5,13.4,13.4z"></path>
      <path
        fill="${color}"
        d="M10,1.4c3.1,0,5.7,2.6,5.7,5.7c0,3.1-2.6,5.7-5.7,5.7c-3.1,0-5.7-2.6-5.7-5.7C4.3,4,6.8,1.4,10,1.4z"></path>

  `.trim()

  return group
}