This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The HIT License (HIT) | |
Copyright (c) 2017 Ken Wheeler | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open ReactNative; | |
type targetDimensions = { | |
x: float, | |
y: float, | |
width: float, | |
height: float | |
}; | |
type _state = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open ReactNative; | |
type targetDimensions = { | |
x: float, | |
y: float, | |
width: float, | |
height: float | |
}; | |
type _state = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open ReactNative; | |
type _state = {mutable elementRef: option ReasonReact.reactRef}; | |
let setRef theRef {ReasonReact.state: state} => state.elementRef = Js.Null.to_opt theRef; | |
type item = | |
Js.t { | |
. | |
id : string, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let scheduleItemPress args self => { | |
let (x, y, width, height, item, index) = args; | |
/* Handle target dimensions */ | |
let fx = float_of_int x; | |
let fy = float_of_int y; | |
let fw = float_of_int width; | |
let fh = float_of_int height; | |
let targetDimensions = {x: fx, y: fy, width: fw, height: fh}; | |
self.ReasonReact.update handleTargetDimensions targetDimensions; | |
/* Set modal coords based upon clicked item */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open ReactNative; | |
/* Variables */ | |
let windowWidth = (Dimensions.get `window)##width; | |
let initialRegion = { | |
"latitude": 47.651857, | |
"longitude": (-122.3552919), | |
"latitudeDelta": 0.001, | |
"longitudeDelta": 0.001 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Bluetooth Demo</title> | |
</head> | |
<body> | |
<button type="button" id="connect">Connect</button> | |
<button type="button" id="fire">FIRE</button> | |
<input type="range" max="1023" min="0" value="512" id="pan" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open ReactNative; | |
/* Types */ | |
type sourceItemDimensions = { | |
x: float, | |
y: float, | |
width: float, | |
height: float | |
}; |