MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / removeOne

Function removeOne

libs/leaflet/leaflet-src.js:2837–2858  ·  view source on GitHub ↗
(obj, type, fn, context, id)

Source from the content-addressed store, hash-verified

2835 }
2836
2837 function removeOne(obj, type, fn, context, id) {
2838 id = id || type + stamp(fn) + (context ? '_' + stamp(context) : '');
2839 var handler = obj[eventsKey] && obj[eventsKey][id];
2840
2841 if (!handler) { return this; }
2842
2843 if (!Browser.touchNative && Browser.pointer && type.indexOf('touch') === 0) {
2844 removePointerListener(obj, type, handler);
2845
2846 } else if (Browser.touch && (type === 'dblclick')) {
2847 removeDoubleTapListener(obj, handler);
2848
2849 } else if ('removeEventListener' in obj) {
2850
2851 obj.removeEventListener(mouseSubst[type] || type, handler, false);
2852
2853 } else {
2854 obj.detachEvent('on' + type, handler);
2855 }
2856
2857 obj[eventsKey][id] = null;
2858 }
2859
2860 // @function stopPropagation(ev: DOMEvent): this
2861 // Stop the given event from propagation to parent elements. Used inside the listener functions:

Callers 2

offFunction · 0.85
batchRemoveFunction · 0.85

Calls 4

stampFunction · 0.85
removePointerListenerFunction · 0.85
removeDoubleTapListenerFunction · 0.85
indexOfMethod · 0.80

Tested by

no test coverage detected