Feat : add used class binding, add vuejs click listener

This commit is contained in:
2024-07-07 10:46:34 +02:00
parent 3055b7f658
commit 5c8ad7b906
104 changed files with 557 additions and 764 deletions
+4 -4
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
width="298" height="417" viewBox="0 0 298 417" id="card80" class="card" xmlns:v-bind="https://heron.legonzaur.fr">
width="298" height="417" viewBox="0 0 298 417" id="card80" class="card" xmlns:v-bind="https://vuejs.org/guide/essentials/class-and-style.html" xmlns:v-on="https://vuejs.org/guide/essentials/event-handling.html">
<defs>
<linearGradient x1="0" y1="0" x2="1" y2="0" gradientUnits="objectBoundingBox" id="grad1">
<stop offset="0" stop-color="gray" stop-opacity="1" />
@@ -32,12 +32,12 @@
<rect x="0" y="65" width="298" height="200" />
<image x="0" y="65" width="298" height="200" xlink:href="../../img/missing.png" />
<g transform="translate(12,265)">
<g>
<g transform="translate(137.0,101.5)">
<g class="svg_effect">
<g transform="translate(137.0,101.5)" v-bind:class="{used:used_effects_indexes.includes(1)}">
<text x="0" y="-7.0" font-size="14" text-anchor="middle" fill="black" font-family="Helvetica"><tspan x="0" dy="0em">+ x pour chaque autre Couteau</tspan><tspan x="0" dy="1em">que vous avez en jeu</tspan></text>
</g>
<g transform="translate(137.0,60.5)" v-bind:class="{used:used_effects_indexes.includes(0)}">
<g class="svg_resource_icon" onclick="this.dispatchEvent(new CustomEvent( 'activate_effect', { bubbles: true, composed:true, detail: '0' } ) );">
<g class="svg_resource_icon" v-on:click="effectClick(0)">
<circle cx="0" cy="0" r="20" fill="red" x="0" y="0" />
<text x="0" y="9" font-size="24" text-anchor="middle" fill="white" font-weight="bold" font-family="Helvetica">1</text>
</g>

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB