Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

boldtrn-leaflet-sleep

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

boldtrn-leaflet-sleep

Leaflet plugin preventing unwanted scroll capturing

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
14
decreased by-22.22%
Maintainers
1
Weekly downloads
 
Created
Source

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

Use

Available on npm, bower, and from the single source source 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

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

FAQs

Package last updated on 15 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc