Tests
This commit is contained in:
parent
28a1b9a787
commit
49363afac1
@ -46,6 +46,11 @@ export const Stats = (props: {
|
|||||||
const selectedElements = getTargetElements(props.elements, props.appState);
|
const selectedElements = getTargetElements(props.elements, props.appState);
|
||||||
const selectedBoundingBox = getCommonBounds(selectedElements);
|
const selectedBoundingBox = getCommonBounds(selectedElements);
|
||||||
|
|
||||||
|
const onGridSizeChange = () => {
|
||||||
|
//TODO: Update the state properly and rerender the grid
|
||||||
|
props.appState.gridSize = ((props.appState.gridSize - 5) % 50) + 10;
|
||||||
|
};
|
||||||
|
|
||||||
if (isMobile && props.appState.openMenu) {
|
if (isMobile && props.appState.openMenu) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -162,13 +167,7 @@ export const Stats = (props: {
|
|||||||
<tr>
|
<tr>
|
||||||
<th colSpan={2}>{"Misc"}</th>
|
<th colSpan={2}>{"Misc"}</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr
|
<tr onClick={onGridSizeChange} style={{ cursor: "pointer" }}>
|
||||||
onClick={() => {
|
|
||||||
// TODO: better way to update the gridSize and re-render the scene
|
|
||||||
props.appState.gridSize =
|
|
||||||
((props.appState.gridSize - 5) % 50) + 10;
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<td>{"Grid size"}</td>
|
<td>{"Grid size"}</td>
|
||||||
<td>{props.appState.gridSize}</td>
|
<td>{props.appState.gridSize}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user