PosAnimation.js (Leaflet-1.8.0) | : | PosAnimation.js (Leaflet-1.9.0) | ||
---|---|---|---|---|
skipping to change at line 13 | skipping to change at line 13 | |||
import * as DomUtil from '../dom/DomUtil'; | import * as DomUtil from '../dom/DomUtil'; | |||
/* | /* | |||
* @class PosAnimation | * @class PosAnimation | |||
* @aka L.PosAnimation | * @aka L.PosAnimation | |||
* @inherits Evented | * @inherits Evented | |||
* Used internally for panning animations, utilizing CSS3 Transitions for modern browsers and a timer fallback for IE6-9. | * Used internally for panning animations, utilizing CSS3 Transitions for modern browsers and a timer fallback for IE6-9. | |||
* | * | |||
* @example | * @example | |||
* ```js | * ```js | |||
* var fx = new L.PosAnimation(); | * var myPositionMarker = L.marker([48.864716, 2.294694]).addTo(map); | |||
* fx.run(el, [300, 500], 0.5); | * | |||
* myPositionMarker.on("click", function() { | ||||
* var pos = map.latLngToLayerPoint(myPositionMarker.getLatLng()); | ||||
* pos.y -= 25; | ||||
* var fx = new L.PosAnimation(); | ||||
* | ||||
* fx.once('end',function() { | ||||
* pos.y += 25; | ||||
* fx.run(myPositionMarker._icon, pos, 0.8); | ||||
* }); | ||||
* | ||||
* fx.run(myPositionMarker._icon, pos, 0.3); | ||||
* }); | ||||
* | ||||
* ``` | * ``` | |||
* | * | |||
* @constructor L.PosAnimation() | * @constructor L.PosAnimation() | |||
* Creates a `PosAnimation` object. | * Creates a `PosAnimation` object. | |||
* | * | |||
*/ | */ | |||
export var PosAnimation = Evented.extend({ | export var PosAnimation = Evented.extend({ | |||
// @method run(el: HTMLElement, newPos: Point, duration?: Number, easeLin earity?: Number) | // @method run(el: HTMLElement, newPos: Point, duration?: Number, easeLin earity?: Number) | |||
End of changes. 1 change blocks. | ||||
2 lines changed or deleted | 15 lines changed or added |