Skip to content

Commit

Permalink
feat(common-general): add zIndex to cardState
Browse files Browse the repository at this point in the history
  • Loading branch information
albertodigioacchino committed Feb 4, 2021
1 parent 74b98bd commit 6f6e72d
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions packages/common/src/game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,25 @@ export type RTDBGame<T, F> = Omit<Game<T, F>, 'rtdbInstance' | 'cards' | 'movedA

export interface CardState {
parent: 'board' | 'panel';
/**
* if it is being moving
*/
lockedBy: string | null;
/**
* Card z-index to put it in front of all the others when drag finish
*/
zIndex: number;
/**
* absolute position inside the board
*/
position?: {
x: number,
y: number
x: number;
y: number;
};
lockedBy: string | null;
estimation: string;
/**
* time estimation placed inside the card
*/
estimation?: string;
}

export type GameEntity<T, F> = Game<T, F> & { id: string };
Expand Down

0 comments on commit 6f6e72d

Please sign in to comment.