Skip to content

Commit

Permalink
Merge pull request #15 from f-o-a-m/rotate
Browse files Browse the repository at this point in the history
add rotate props and defaultProps
  • Loading branch information
safareli authored Mar 6, 2019
2 parents 1e378ff + 2a39791 commit 545101f
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions example/heatmap-halogen/src/MapComponent.purs
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ mapClass = R.component "Map" \this -> do
, mapStyle
, mapboxApiAccessToken
, ref: mkEffectFn1 $ mapRefHandler mapRef
, dragRotate: true
, touchZoomRotate: true
})
[]

Expand Down
2 changes: 2 additions & 0 deletions example/map-halogen/src/MapComponent.purs
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ mapClass = R.component "Map" \this -> do
, mapStyle: mapStyle
, mapboxApiAccessToken: mapboxApiAccessToken
, onLoad: pure unit
, dragRotate: true
, touchZoomRotate: true
})
[]

Expand Down
2 changes: 2 additions & 0 deletions example/map/src/Main.purs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ mapClass = R.component "Map" \this -> do
, mapStyle: mapStyle
, mapboxApiAccessToken: mapboxApiAccessToken
, onLoad: pure unit
, dragRotate: true
, touchZoomRotate: true
})
[]

Expand Down
2 changes: 2 additions & 0 deletions example/signal-halogen/src/MapComponent.purs
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ mapClass = R.component "Map" \this -> do
, mapStyle
, mapboxApiAccessToken
, ref: mkEffectFn1 $ mapRefHandler mapRef
, dragRotate: true
, touchZoomRotate: true
})
[]

Expand Down
1 change: 1 addition & 0 deletions src/MapGL.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const MapGL = require('react-map-gl');

exports.mapGL = MapGL.default;
exports.defaultProps = MapGL.default.defaultProps;

exports.getMapImpl = function (mapRef) {
return mapRef
Expand Down
4 changes: 4 additions & 0 deletions src/MapGL.purs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module MapGL
, MapPropsR
, mkProps
, mapGL
, defaultProps
, getMap
) where

Expand Down Expand Up @@ -65,6 +66,8 @@ type MapPropsR r =
, mapStyle :: String
, mapboxApiAccessToken :: String
, children :: R.Children
, dragRotate :: Boolean
, touchZoomRotate :: Boolean
| r
)

Expand All @@ -74,6 +77,7 @@ mkProps :: Viewport -> Record (MapPropsR ()) -> MapProps
mkProps (Viewport vp) rest = disjointUnion rest vp

foreign import mapGL :: R.ReactClass MapProps
foreign import defaultProps :: MapProps

-- Default map component by `ReactMapGL` to render `MapboxGL`
-- https://github.com/uber/react-map-gl/blob/master/docs/components/interactive-map.md
Expand Down

0 comments on commit 545101f

Please sign in to comment.