Buckets:
| import { | |
| ReactZoomPanPinchContentRef, | |
| ReactZoomPanPinchContext, | |
| ReactZoomPanPinchContextState, | |
| ReactZoomPanPinchRef, | |
| } from "../models/context.model"; | |
| import { | |
| zoomIn, | |
| zoomOut, | |
| setTransform, | |
| resetTransform, | |
| zoomToElement, | |
| centerView, | |
| } from "../core/handlers/handlers.logic"; | |
| export const getControls = ( | |
| contextInstance: ReactZoomPanPinchContext, | |
| ): ReactZoomPanPinchContentRef => { | |
| return { | |
| instance: contextInstance, | |
| state: contextInstance.state, | |
| zoomIn: zoomIn(contextInstance), | |
| zoomOut: zoomOut(contextInstance), | |
| setTransform: setTransform(contextInstance), | |
| resetTransform: resetTransform(contextInstance), | |
| centerView: centerView(contextInstance), | |
| zoomToElement: zoomToElement(contextInstance), | |
| }; | |
| }; | |
| export const getState = ( | |
| contextInstance: ReactZoomPanPinchContext, | |
| ): ReactZoomPanPinchContextState => { | |
| return { | |
| instance: contextInstance, | |
| state: contextInstance.state, | |
| }; | |
| }; | |
| export const getContext = ( | |
| contextInstance: ReactZoomPanPinchContext, | |
| ): ReactZoomPanPinchRef => { | |
| const ref = {} as ReactZoomPanPinchRef; | |
| Object.assign(ref, getState(contextInstance)); | |
| Object.assign(ref, getControls(contextInstance)); | |
| return ref; | |
| }; | |
Xet Storage Details
- Size:
- 1.22 kB
- Xet hash:
- 205d85ea43d11d6dc13fce1d9dec763e1e469e9db653a61ba4ce33d850483fc0
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.