<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. */
(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
});
});
})();
#tires-2 {
padding: 1rem;
.container {
width: 100%;
height: calc(100vh - 2rem);
}
svg {
border: 1px solid teal;
width: 100%;
height: auto;
}
}
No notes defined.