1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- export const setCurrentPage: ReducerFuncType = (state, { payload }) => ({
- ...state,
- currentPage: payload,
- });
- export const setTotalPage: ReducerFuncType = (state, { payload }) => ({
- ...state,
- totalPage: payload,
- });
- export const setPdf: ReducerFuncType = (state, { payload }) => ({
- ...state,
- pdf: payload,
- });
- export const setProgress: ReducerFuncType = (state, { payload }) => ({
- ...state,
- progress: payload,
- });
- export const setViewport: ReducerFuncType = (state, { payload }) => ({
- ...state,
- viewport: payload,
- });
- export const changeScale: ReducerFuncType = (state, { payload }) => ({
- ...state,
- scale: payload,
- });
- export const changeRotate: ReducerFuncType = (state, { payload }) => ({
- ...state,
- rotation: payload,
- });
- export const addAnnotation: ReducerFuncType = (state, { payload }) => ({
- ...state,
- annotations: [...state.annotations, ...payload.annotations],
- initiated: payload.init,
- });
- export const updateAnnotation: ReducerFuncType = (state, { payload }) => ({
- ...state,
- annotations: [...payload],
- initiated: true,
- });
- export const updateWatermark: ReducerFuncType = (state, { payload }) => ({
- ...state,
- watermark: {
- ...state.watermark,
- ...payload,
- },
- });
- export const setTextDivs: ReducerFuncType = (state, { payload }) => ({
- ...state,
- textDivs: payload,
- });
|