Cosmetic (reformat)
This commit is contained in:
parent
db0761efd1
commit
4bbb642b41
|
@ -30,10 +30,7 @@ setupIonicReact();
|
|||
const App: React.FC = () => (
|
||||
<IonApp>
|
||||
<Provider store={store}>
|
||||
<Slippy />
|
||||
<Layer>
|
||||
<TiledMap />
|
||||
</Layer>
|
||||
|
||||
</Provider>
|
||||
</IonApp>
|
||||
);
|
||||
|
|
|
@ -8,20 +8,19 @@ import Slippy from '../slippy/slippy';
|
|||
import TiledMap from './tiled-map';
|
||||
|
||||
const Map: react.FC<{}> = (props: {}) => {
|
||||
const dispatch = useDispatch();
|
||||
|
||||
const resizeHandler = () => {
|
||||
dispatch(mapActions.resize());
|
||||
};
|
||||
const debouncedResizeHandler = useMemo(
|
||||
() => _.debounce(resizeHandler, 500),
|
||||
[]
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
window.addEventListener('resize', debouncedResizeHandler);
|
||||
}, []);
|
||||
|
||||
const dispatch = useDispatch();
|
||||
|
||||
const resizeHandler = () => {
|
||||
dispatch(mapActions.resize());
|
||||
};
|
||||
const debouncedResizeHandler = useMemo(
|
||||
() => _.debounce(resizeHandler, 500),
|
||||
[]
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
window.addEventListener('resize', debouncedResizeHandler);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
|
|
|
@ -105,7 +105,9 @@ const mapSlice = createSlice({
|
|||
resize: (state) => {
|
||||
return computeStateFromScope(state.scope);
|
||||
},
|
||||
shift: (state, action) => {},
|
||||
shift: (state, action) => {
|
||||
|
||||
},
|
||||
scale: (state, action) => {},
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue