Skip to content

Commit 93f5e75

Browse files
committed
remove unused code
1 parent 64b6942 commit 93f5e75

1 file changed

Lines changed: 1 addition & 21 deletions

File tree

select2.js

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -154,26 +154,7 @@
154154
});
155155
}
156156

157-
/**
158-
* filters mouse events so an event is fired only if the mouse moved.
159-
*
160-
* filters out mouse events that occur when mouse is stationary but
161-
* the elements under the pointer are scrolled.
162-
*/
163-
function installFilteredMouseMove(element) {
164-
var context = $(element[0].document);
165-
context.on("mousemove", function (e) {
166-
context.data("select2-lastpos", {x: e.pageX, y: e.pageY});
167-
});
168-
element.bind("mousemove", function (e) {
169-
var lastpos = context.data("select2-lastpos");
170-
if (lastpos === undefined || lastpos.x !== e.pageX || lastpos.y !== e.pageY) {
171-
$(e.target).trigger("mousemove-filtered", e);
172-
}
173-
});
174-
}
175-
176-
/**
157+
/**
177158
* Debounces a function. Returns a function that calls the original fn function only if no invocations have been made
178159
* within the last quietMillis milliseconds.
179160
*
@@ -422,7 +403,6 @@
422403
// initialize the container
423404
this.initContainer();
424405

425-
//installFilteredMouseMove(this.results);
426406
this.dropdown.delegate(resultsSelector, "mouseover", this.bind(this.highlightUnderEvent));
427407

428408
installDebouncedScroll(80, this.results);

0 commit comments

Comments
 (0)