Code Monkey home page Code Monkey logo

leaflet-splitmap's People

Contributors

bertspaan avatar bollwyvl avatar danielbarela avatar ghybs avatar gmaclennan avatar martinrenou avatar oxidase avatar sylvaincorlay avatar vasavanthiru avatar

Stargazers

 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-splitmap's Issues

Dragging not possible anymore on non-touch devices

Dragging of split slider is not possible (anymore) due to an incorrect assumption of the L.Browser module.

on(range, L.Browser.touch ? 'touchstart' : 'mousedown', cancelMapDrag, this)

on(range, L.Browser.touch ? 'touchend' : 'mouseup', uncancelMapDrag, this)

Tested with Google Chrome 105.0.5195.102 and version earlier.
Android/iOS is still working, only desktop browsers are affected.

Background;:

L.Browser.touch stays true even if you are using a non-touch device. It would be better to rely on global window variable like other leaflet plugins.

[Feature request] Add vertical option

I like this control a lot, but some time it's needed it to work on vertical screens (in my case in vertical signaling screen, but could also mean in portrait mobile devices).

bindPopup trigger Cannot read property 'call' of undefined

Hi,

I'am trying to add Popup to leaflet object in splitMap, but i'am getting this error :

TypeError: Cannot read property 'call' of undefined
NewClass.fire
src/core/Events.js:190
  187 | 			this._firingCount = (this._firingCount + 1) || 1;
  188 | 			for (var i = 0, len = listeners.length; i < len; i++) {
  189 | 				var l = listeners[i];
> 190 | 				l.fn.call(l.ctx || this, event);
      | ^  191 | 			}
  192 | 
  193 | 			this._firingCount--;

NewClass.removeLayer
src/layer/Layer.js:195
  192 | delete this._layers[id];
  193 | 
  194 | if (this._loaded) {
> 195 | 	this.fire('layerremove', {layer: layer});
      | ^  196 | 	layer.fire('remove');
  197 | }
  198 | 

NewClass.closePopup
src/layer/Popup.js:347
  344 | 		this._popup = null;
  345 | 	}
  346 | 	if (popup) {
> 347 | 		this.removeLayer(popup);
      | ^  348 | 	}
  349 | 	return this;
  350 | }

NewClass._close
src/layer/Popup.js:171
  168 | 
  169 | _close: function () {
  170 | 	if (this._map) {
> 171 | 		this._map.closePopup(this);
      | ^  172 | 	}
  173 | },
  174 | 

NewClass._onCloseButtonClick
src/layer/Popup.js:281
  278 | },
  279 | 
  280 | _onCloseButtonClick: function (e) {
> 281 | 	this._close();
      | ^  282 | 	DomEvent.stop(e);
  283 | },
  284 | 

HTMLAnchorElement.handler
src/dom/DomEvent.js:79
  76 | if (obj[eventsKey] && obj[eventsKey][id]) { return this; }
  77 | 
  78 | var handler = function (e) {
> 79 | 	return fn.call(context || obj, e || window.event);
     | ^  80 | };
  81 | 
  82 | var originalHandler = handler;
L.control.splitMap(leftPaneObjects, rightPaneObjects)

leftPaneObjects and rightPaneObjects are array of marker and polyline.
I used L.marker().bindPopup() : this crash
And L.popup() directly on map : this crash too
I tried to add popup on different pane, but still crash

If anyone has a solution, that would help me a lot, thanks !

L is undefined

The sample code just doesn't work.
I've also tried to import this in my vue project and bypassing the missing type definitions it doesn't add sideBySide to L.control

I tried the original leaflet-side-by-side and everything imports fine (just getting 1 layer, no comparison)

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.