mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-06-01 01:59:10 +00:00
@@ -53,12 +53,14 @@ export default function usePlatformMethods(hostRef: ElementRef<any>, props: Obje
|
|||||||
hostRef,
|
hostRef,
|
||||||
() => {
|
() => {
|
||||||
const hostNode = hostRef.current;
|
const hostNode = hostRef.current;
|
||||||
hostNode.measure = callback => UIManager.measure(hostNode, callback);
|
if (hostNode != null) {
|
||||||
hostNode.measureLayout = (relativeToNode, success, failure) =>
|
hostNode.measure = callback => UIManager.measure(hostNode, callback);
|
||||||
UIManager.measureLayout(hostNode, relativeToNode, failure, success);
|
hostNode.measureLayout = (relativeToNode, success, failure) =>
|
||||||
hostNode.measureInWindow = callback => UIManager.measureInWindow(hostNode, callback);
|
UIManager.measureLayout(hostNode, relativeToNode, failure, success);
|
||||||
hostNode.setNativeProps = nativeProps =>
|
hostNode.measureInWindow = callback => UIManager.measureInWindow(hostNode, callback);
|
||||||
setNativeProps(hostNode, nativeProps, classList, pointerEvents, style, previousStyleRef);
|
hostNode.setNativeProps = nativeProps =>
|
||||||
|
setNativeProps(hostNode, nativeProps, classList, pointerEvents, style, previousStyleRef);
|
||||||
|
}
|
||||||
return hostNode;
|
return hostNode;
|
||||||
},
|
},
|
||||||
[hostRef, classList, pointerEvents, style]
|
[hostRef, classList, pointerEvents, style]
|
||||||
|
|||||||
Reference in New Issue
Block a user