# boldtrn-leaflet-sleep

> Leaflet plugin preventing unwanted scroll capturing

Latest version **0.1.0** (published 2020-04-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install boldtrn-leaflet-sleep
pnpm add boldtrn-leaflet-sleep
yarn add boldtrn-leaflet-sleep
bun add boldtrn-leaflet-sleep
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2020-04-15 |
| First published | 2020-04-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 21.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 91 |
| Author | rocks.in.the.cloud+leafletsleep@gmail.com |
| Maintainers | boldtrn |

## Links

- npm: https://www.npmjs.com/package/boldtrn-leaflet-sleep
- Repository: https://github.com/CliffCloud/Leaflet.Sleep
- Homepage: http://cliffcloud.github.io/Leaflet.Sleep
- Issues: https://github.com/CliffCloud/Leaflet.Sleep/issues
- npm.io page: https://npm.io/package/boldtrn-leaflet-sleep

## Recent versions

- 0.1.0 (latest) — 2020-04-15

## README

# Leaflet.Sleep

__Please note, this is a fork of Leaflet.Sleep, it has a few minor adjustments that will be hopefully merged into the main repo soon__

Leaflet's stock maps are event-greedy and interfere with scrolling.

`Leaflet.Sleep` is an interaction manager, helping your
map do what you want when you want.

### [Demo](http://cliffcloud.github.io/Leaflet.Sleep)

## Use

Available on [npm](#npm), [bower](#bower), and from the single source
[source](https://github.com/CliffCloud/Leaflet.Sleep/blob/master/Leaflet.Sleep.js)
file.

`Leaflet.Sleep` is enabled on all maps by default,
but can be disabled with each map's `sleep` option.

### npm

[`npm install leaflet-sleep`](https://www.npmjs.com/package/leaflet-sleep)

### bower

`bower install leaflet-sleep`

## Config

These are the new options available for `L.map` (and the defaults).

```
{
    // false if you want an unruly map
    sleep: true,

    // time(ms) until map sleeps on mouseout
    sleepTime: 750,

    // time(ms) until map wakes on mouseover
    wakeTime: 750,

    // should the user receive wake instructions?
    sleepNote: true,

    // should hovering wake the map? (non-touch devices only)
    hoverToWake: true,

    // a message to inform users about waking the map
    wakeMessage: 'Click or Hover to Wake',

    // a constructor for a control button
    sleepButton: L.Control.sleepMapControl,

    // opacity for the sleeping map
    sleepOpacity: .7
}
```

## MIT Licensed

---
_Source: https://npm.io/package/boldtrn-leaflet-sleep · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
