Show deprecation warning in console for MouseTracker.exitHandler

This commit is contained in:
Mark Salsbery 2021-02-10 08:32:00 -08:00
parent 4b40400cd3
commit 72fe7a9025

View File

@ -294,6 +294,10 @@
this.hasScrollHandler = !!this.scrollHandler; this.hasScrollHandler = !!this.scrollHandler;
this.hasContextMenuHandler = !!this.contextMenuHandler; this.hasContextMenuHandler = !!this.contextMenuHandler;
if (this.exitHandler) {
$.console.error("MouseTracker.exitHandler is deprecated. Use MouseTracker.leaveHandler instead.");
}
if ( !options.startDisabled ) { if ( !options.startDisabled ) {
this.setTracking( true ); this.setTracking( true );
} }
@ -3417,7 +3421,7 @@
} }
// Leave (doesn't bubble and not cancelable) // Leave (doesn't bubble and not cancelable)
// Note: exitHandler is deprecated, replaced by leaveHandler // Note: exitHandler is deprecated (v2.5.0), replaced by leaveHandler
if ( tracker.leaveHandler || tracker.exitHandler ) { if ( tracker.leaveHandler || tracker.exitHandler ) {
dispatchEventObj = { dispatchEventObj = {
eventSource: tracker, eventSource: tracker,