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

Function off

libs/leaflet/leaflet-src.js:2750–2776  ·  view source on GitHub ↗
(obj, types, fn, context)

Source from the content-addressed store, hash-verified

2748 // @function off(el: HTMLElement): this
2749 // Removes all previously added listeners from given HTMLElement
2750 function off(obj, types, fn, context) {
2751
2752 if (arguments.length === 1) {
2753 batchRemove(obj);
2754 delete obj[eventsKey];
2755
2756 } else if (types && typeof types === 'object') {
2757 for (var type in types) {
2758 removeOne(obj, type, types[type], fn);
2759 }
2760
2761 } else {
2762 types = splitWords(types);
2763
2764 if (arguments.length === 2) {
2765 batchRemove(obj, function (type) {
2766 return indexOf(types, type) !== -1;
2767 });
2768 } else {
2769 for (var i = 0, len = types.length; i < len; i++) {
2770 removeOne(obj, types[i], fn, context);
2771 }
2772 }
2773 }
2774
2775 return this;
2776 }
2777
2778 function batchRemove(obj, filterFn) {
2779 for (var id in obj[eventsKey]) {

Callers 3

leaflet-src.jsFile · 0.70
enableImageDragFunction · 0.70
restoreOutlineFunction · 0.70

Calls 4

batchRemoveFunction · 0.85
removeOneFunction · 0.85
splitWordsFunction · 0.85
indexOfFunction · 0.70

Tested by

no test coverage detected