aboutsummaryrefslogtreecommitdiffstats
path: root/extlib/leaflet/src/dom/transition/Transition.js
blob: ccf4857270a6752c538dd156d6a7b4237301a032 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
L.Transition = L.Class.extend({
	includes: L.Mixin.Events,
	
	statics: {
		CUSTOM_PROPS_SETTERS: {
			position: L.DomUtil.setPosition
			//TODO transform custom attr
		},
		
		implemented: function() {
			return L.Transition.NATIVE || L.Transition.TIMER;
		}
	},
	
	options: {
		easing: 'ease',
		duration: 0.5
	},
	
	_setProperty: function(prop, value) {
		var setters = L.Transition.CUSTOM_PROPS_SETTERS;
		if (prop in setters) {
			setters[prop](this._el, value);
		} else {
			this._el.style[prop] = value;
		}
	}
});