fix div bug
This commit is contained in:
@@ -5,28 +5,26 @@ import { Stylable } from "./toolbox";
|
||||
|
||||
export default (props: { handCount: number } & Stylable) => {
|
||||
return (
|
||||
<div class={props.class} style={props.style}>
|
||||
<For each={Array(props.handCount)}>
|
||||
{(_, i) => {
|
||||
const midOffset = i() + 0.5 - props.handCount / 2;
|
||||
return (
|
||||
<Card
|
||||
face="down"
|
||||
scale={0.4}
|
||||
style={{
|
||||
"margin-left": "-12px",
|
||||
"margin-right": "-12px",
|
||||
transform: `translate(0px, ${Math.pow(
|
||||
Math.abs(midOffset),
|
||||
2
|
||||
)}px) rotate(${midOffset * 0.12}rad)`,
|
||||
"min-width": "40px",
|
||||
"box-shadow": "-4px 4px 6px rgba(0, 0, 0, 0.6)",
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}}
|
||||
</For>
|
||||
</div>
|
||||
<For each={Array(props.handCount)}>
|
||||
{(_, i) => {
|
||||
const midOffset = i() + 0.5 - props.handCount / 2;
|
||||
return (
|
||||
<Card
|
||||
face="down"
|
||||
scale={0.4}
|
||||
style={{
|
||||
"margin-left": "-12px",
|
||||
"margin-right": "-12px",
|
||||
transform: `translate(0px, ${Math.pow(
|
||||
Math.abs(midOffset),
|
||||
2
|
||||
)}px) rotate(${midOffset * 0.12}rad)`,
|
||||
"min-width": "40px",
|
||||
"box-shadow": "-4px 4px 6px rgba(0, 0, 0, 0.6)",
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}}
|
||||
</For>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -87,7 +87,6 @@ export default () => {
|
||||
<Portal
|
||||
mount={table.players[playerKey].ref}
|
||||
ref={(ref) => {
|
||||
console.log("Setting hand ref");
|
||||
const midOffset =
|
||||
i() + 0.5 - Object.values(view().playerHandCounts).length / 2;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user