Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
mask: true
},
stop: {
x: 240,
y: 0,
width: 80,
height: 80,
mask: true
}
};
function clamp(f) {
return f < 0 ? 0 : f > 1 ? 1 : f;
}
export class CustomMapControls extends experimental.MapControls {
constructor(props) {
super(props);
this.props = props;
this.events = ["click", "mousedown"];
}
handleEvent(event) {
if (event.type === "mousedown") {
this.props.onMouseDown();
}
return super.handleEvent(event);
}
}
class MapBox extends Component {
constructor(props) {