Skip to content

Commit

Permalink
Merge pull request #6 from f-o-a-m/tmp
Browse files Browse the repository at this point in the history
add/remove some props, etc
  • Loading branch information
safareli authored Jun 1, 2018
2 parents f752168 + 5a241e4 commit f8fa752
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/icon/src/Main.purs
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ iconLayerSpec = (R.spec' getInitialState render) {componentWillReceiveProps = re
( Icon.defaultIconProps { id = "icon"
, data = map (\m -> {meteorite : m}) props.data
, pickable = false
, fp64 = false
, visible = true
, iconAtlas = props.iconAtlas
, iconMapping = props.iconMapping
Expand All @@ -214,7 +215,6 @@ iconLayerSpec = (R.spec' getInitialState render) {componentWillReceiveProps = re
$ R.createFactory DeckGL.deckGL
$ build (merge vp)
{ layers: [iconLayer]
, initializer: DeckGL.initializeGL
}

getInitialState :: R.GetInitialState MeteoriteProps MeteoriteState eff
Expand Down
6 changes: 1 addition & 5 deletions src/DeckGL.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
var DeckGL = require('deck.gl');

exports.initializeGL = function(gl) {
gl.enable(gl.DEPTH_TEST);
gl.depthFunc(gl.LEQUAL);
};

exports.defaultDeckGLProps = DeckGL.DeckGL.defaultProps;
exports.deckGL = DeckGL.DeckGL;
4 changes: 2 additions & 2 deletions src/DeckGL.purs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import WebMercator.Viewport (ViewportR)
foreign import data Layer :: Type
foreign import data GLInitializer :: Type

foreign import initializeGL :: GLInitializer
foreign import defaultDeckGLProps :: DeckGLProps


type MapPropsR r =
( layers :: Array Layer
, initializer :: GLInitializer
| r
)

Expand Down
2 changes: 2 additions & 0 deletions src/DeckGL/BaseProps.purs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ type LightSettings =
-- | - `visibility`: Controls the visibility of the layer, should use instead of conditional rendering.
-- | - `opacity`: The opacity of the layer.
-- | - `pickable`: Whether the layer responds to mouse picking events.
-- | - `fp64`: Whether the layer should be rendered in high-precision 64-bit mode
-- | - `onHover`: Callback that gets called when hovering on an object.
-- | - `onClick`: Callback for clicking on an object in a layer.
-- | - `autoHighlight`: When true, the current object pointed to by the mouse on hover is highlighted with the color
Expand All @@ -53,6 +54,7 @@ type BaseProps eff rest a =
, visible :: Boolean
, opacity :: Number
, pickable :: Boolean
, fp64 :: Boolean
, onHover :: EffFn1 eff (PickingInfo a) Boolean
, onClick :: EffFn1 eff (PickingInfo a) Boolean
, autoHighlight :: Boolean
Expand Down
1 change: 1 addition & 0 deletions src/DeckGL/Layer/Icon.purs
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,6 @@ type IconLayerProps d eff = BaseProps
, getPosition :: IconData d -> LngLat
, getSize :: IconData d -> Number
, getIcon :: IconData d -> String
, getColor :: IconData d -> Array Number
)
(IconData d)

0 comments on commit f8fa752

Please sign in to comment.