Implement webworker for save operation + Limit the history size (#29)
All checks were successful
continuous-integration/drone/push Build is passing

- Implement webworker for save operation
- Limit the history size

Reviewed-on: https://git.siklos-chaneru.duckdns.org/Siklos/svg-layout-designer-react/pulls/29
This commit is contained in:
Siklos 2022-08-15 11:52:17 -04:00
parent 5b20e4f2dc
commit 7ff411b988
6 changed files with 64 additions and 18 deletions

View file

@ -14,9 +14,7 @@ export const History: React.FC<IHistoryProps> = (props: IHistoryProps) => {
const Row = ({ index, style }: {index: number, style: React.CSSProperties}): JSX.Element => {
const reversedIndex = (props.history.length - 1) - index;
const step = props.history[reversedIndex];
const desc = reversedIndex > 0
? `${reversedIndex}: ${step.LastAction}`
: 'Go to the beginning';
const desc = step.LastAction;
const selectedClass = reversedIndex === props.historyCurrentStep
? 'bg-blue-500 hover:bg-blue-600'