Git Product home page Git Product logo

leaflet.sleep's People

Contributors

atstp avatar boldtrn avatar c5creative avatar fbonzon avatar fkoester avatar iostat avatar ivan-hilckov avatar juliengirault avatar lauriemustafic avatar martinduparc avatar tschopo avatar valentinh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

leaflet.sleep's Issues

Listener not found warning

Using Leaflet.Sleep with the latest leaflet.js (1.8.0). After I move the mouse over the map, all browsers throws a warning Listener not found in Events.js:180:10.

The Events.js is not physically present in my file structure, seems it is generated by leaflet itself and the console shows it's path as src/core/Events.js.

There might be some conflict between Leaflet.Sleep and the newest leaflet, because with older leaflet.js there is no warning.

Also when I remove Leaflet.Sleep from my webpage and use only leaflet.js, the warning is gone, so it is definitely caused by Leaflet.Sleep.

Hover activation - only when mouse stops moving?

Currently the timer for hover activation starts when the mouse moves over the map.

This means that the map comes alive while the mouse is moving around.

Instead I'd like that timer to start only when the mouse has stopped moving relative to the map. If the mouse stops for sufficient time (the wakeTime) only then should the map activate.

Works with react-mapbox?

I had to move from leaflet to mapbox because of the styling of the latter. Do you know how hard it is to use Leaflet.Sleep w/ a ReactMapboxGl?

sleepButton options or example

is it possible to make the option of the sleepButton configurable? I would need to overwrite the options (like style and label).
I tried to define and use a custom button for Leaflet.Sleep package but it didn't work for me.

Support for touch devices

Nice library!

I am missing one feature though: Support for touch devices.

On mobile devices with touch screen we have a slightly different problem. Here it is not the mouse wheel scrolling which interferes with map zoom but the (one finger) touch scrolling which interferes with map panning. Could you maybe add support for that too?

I will look into your code and see if I can make a PR myself.

On Touch Devices: Can't Enable Map after Disable

Once pressing "disable" the Map cannot be reenabled. This happens on touch devices (Tested on Android 6.0.1 with Firefox for Android 58.0.1).

https://jsfiddle.net/9p4Lugsm/

Reenabling doesn't work if you click the disable button and then scroll. However it does work when you do not scroll after clicking the button.

(With touch simulation on desktop Firefox it works correctly)

Don't enable by default and don't use the map options

I really like this plugin. It seems to be offering exactly what I was looking for.

But I don't like the way the plugin gets activated once it is loaded. Also I think it's not ideal that we use the map options to configure the plugin.

Wouldn't it be better to add this plugin on demand with it's own config options like:

L.Control.SleepMapControl({ options }).addTo(map);

Since using this plugin is only a minor side-track for my code, I have to add special handling like this:

mapOptions = {...};

if(...){
   require('leaflet-sleep');
   mapOptions.sleepOpacity = X;
   ...
}

map = L.map('map', mapOptions);

Most other Leaflet plugins seem to use their own construction as well and don't use the map for that.

Overlay message masks events even when faded

When the 'Click to Wake' message disappears it leaves behind a dead area right in the centre of the map that does not transmit hover or click events through to the layers (such as markers) beneath. I think this is because the message layer has opacity set to zero rather than being completely removed.

Sleep Blanket doesn't leave

This is kind of a weird one...

So if you place your cursor where a map with Leaflet.Sleep is going to load on the page before it is loaded.

The Leaflet.Sleep blanket won't clear until you leave the map and re-enter it. A super small thing, just something I noticed. ๐Ÿ˜ƒ

License?

Hi,

I'm interested in using Leaflet.Sleep for my project (http://opencontext.org). I can't find any license information however. Is this available for reuse / forking / etc.? If so, can you stick on a recognized open source license?

Thanks!
-Eric

changes for an npm V1 release

Picking up from pull request #11

readme updates

needed for sure.

  • better overview?
  • more detailed use section, perhaps with a copy-pastable example
  • the code block at the bottom is ugly

Is there anything that's missing at the moment?

config changes

What are the pros of pulling default configs out of the plugin and forcing the user to set them?

I'm hesitant to commit fully to that because then every user needs to add ~10 lines that he or she might not care about.

@juliengirault thoughts?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.