Remove rotation on market and discard cards

Closes #16
This commit is contained in:
2024-05-13 17:12:01 +02:00
parent 2c4f9abc8d
commit bf036da9a0
4 changed files with 11 additions and 7 deletions
+4 -2
View File
@@ -5,10 +5,12 @@ export interface Props {
card_id: number | undefined
locked?: boolean
wrapped?: boolean
tilted?: boolean
}
const props = withDefaults(defineProps<Props>(), {
wrapped: () => false,
tilted: () => true
})
@@ -40,8 +42,8 @@ watch(
<template>
<div :class="`card ${childCount > 0 ? 'active' : ''} ${wrapped ? 'wrapped' : ''} ${props.locked ? 'locked' : ''}`"
@contextmenu.prevent="false" @click.left="cardClick" :style="`rotate:${rotation}deg;`" @mouseenter="mouseenter"
@mouseleave="mouseleave">
@contextmenu.prevent="false" @click.left="cardClick" :style="tilted ? `rotate:${rotation}deg;` : ''"
@mouseenter="mouseenter" @mouseleave="mouseleave">
<div id="contextMenuButtons" :ref="(el) => { childCount = ((el as Element)?.childElementCount ?? 0) }">
<slot></slot>
</div>