123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- 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,
- },
- });
|