<section id="tires-2">
    <div class="container"></div>
</section>

<script src="https://cdn.jsdelivr.net/npm/@svgdotjs/svg.js@3.0/dist/svg.min.js"></script>
<script src="../../js/components/tires-2.js"></script>
<section id="tires-2">
    <div class="container"></div>
</section>

<script src="https://cdn.jsdelivr.net/npm/@svgdotjs/svg.js@3.0/dist/svg.min.js"></script>
<script src="{{ path '/js/components/tires-2.js' }}"></script>
/* No context defined. */
  • Content:
    (function () {
      document.addEventListener('DOMContentLoaded', function () {
        console.log("tires-2 active");
    
        const draw = SVG().addTo('#tires-2 .container')
          .size(400, 300);
    
        const rect = draw.rect(100, 100)
          .attr({
            fill: '#C873FF'
          });
    
        const rect2 = draw.rect(100, 100)
          .attr({
            fill: '#FF5B99',
            x: 200,
            y: 200
          });
    
        const rect3 = draw.rect(100, 100)
          .attr({
            fill: '#609CFF',
            x: 400,
            y: 400
          });
      });
    })();
    
  • URL: /components/raw/tires-2/tires-2.js
  • Filesystem Path: components/03-svgjs/01-tires/02-tires-2/tires-2.js
  • Size: 524 Bytes
  • Content:
    #tires-2 {
      padding: 1rem;
    
      .container {
        width: 100%;
        height: calc(100vh - 2rem);
      }
    
      svg {
        border: 1px solid teal;
        width: 100%;
        height: auto;
      }
    }
    
  • URL: /components/raw/tires-2/tires-2.scss
  • Filesystem Path: components/03-svgjs/01-tires/02-tires-2/tires-2.scss
  • Size: 175 Bytes

No notes defined.