Skip to content
forked from Leaflet/Leaflet

🍃 Windy's version of Leaflet with some patches applied

License

Notifications You must be signed in to change notification settings

windycom/Leaflet

This branch is 8 commits ahead of, 1168 commits behind Leaflet/Leaflet:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Ivo Lukacovic
Oct 1, 2019
fa054e6 · Oct 1, 2019
Dec 5, 2018
Oct 1, 2019
Dec 22, 2018
Mar 16, 2018
Aug 13, 2018
Mar 3, 2019
Jan 14, 2019
Oct 1, 2019
Apr 10, 2018
Jun 25, 2018
Dec 30, 2018
Oct 9, 2018
Apr 26, 2017
Mar 5, 2018
Dec 30, 2018
Oct 1, 2019
Aug 22, 2018
Jan 30, 2017
Dec 30, 2018

Repository files navigation

Windy's patched version of Leaflet library

Changes applied:

Added:

  • src/windyPatches/Map.SingleClick.js
  • src/windyPatches/TileLayer.Multi.js

Patched A nasty hack enable to touch zoom with some specified x,y point "locked" at its position. For instance weather picker at Windy.com.

Looks ugly, no animation, but it works.

var TouchZoom = Handler.extend({

	// ...

	// Patched by Windy
	_onTouchMove: function (e) {

		// ..

		if( map._zoomCenter ) {
			var myZoom_ = Math.round( this._zoom )

			// ..

			if( myZoom_ !== map.getZoom() ) {
				map.setZoomAround( map._zoomCenter, myZoom_, { animate: true });
			}
			preventDefault(e);
			return
		}

		// ..

	}

Another patch solves this issue Leaflet#3575

function setTransform(el, offset, scale) {
	var pos = (offset && offset.round()) || new Point(0, 0);

	// ...
}

This patch solves wrong detection of pointer Events browser in iOS. Leaflet#6817

// @property pointer: Boolean
// `true` for all browsers supporting [pointer events](https://msdn.microsoft.com/en-us/library/dn433244%28v=vs.85%29.aspx).
// 'false' for all iOS devices, that (as of version iOS13 support both, touch and poiter events)
export var pointer = !!(window.PointerEvent || msPointer) && (window.W && (window.W.target !== 'mobile'))
		&& !userAgentContains('iphone')
		&& !(navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1);

About

🍃 Windy's version of Leaflet with some patches applied

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 82.6%
  • HTML 17.3%
  • Other 0.1%