MCPcopy Create free account
hub / github.com/tomchentw/react-google-maps / getOffsetOverride

Function getOffsetOverride

lib/utils/OverlayViewHelper.js:19–34  ·  view source on GitHub ↗
(containerElement, props)

Source from the content-addressed store, hash-verified

17
18/* global google */
19function getOffsetOverride(containerElement, props) {
20 var getPixelPositionOffset = props.getPixelPositionOffset
21 //
22 // Allows the component to control the visual position of the OverlayView
23 // relative to the LatLng pixel position.
24 //
25
26 if ((0, _isFunction3.default)(getPixelPositionOffset)) {
27 return getPixelPositionOffset(
28 containerElement.offsetWidth,
29 containerElement.offsetHeight
30 )
31 } else {
32 return {}
33 }
34}
35
36function createLatLng(inst, Type) {
37 return new Type(inst.lat, inst.lng)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected