src/mousetracker.js
/**
     * Stop capturing pointer events to the tracked element.
     * @private
     * @inner
     */
Stop capturing pointer events to the tracked element.
@private
@inner
Stop capturing pointer events to the tracked element . @private @inner
function releasePointer( tracker, gPoint ) {
        var eventParams;
        var pointsList;
        var cachedGPoint;
        if ( $.MouseTracker.havePointerCapture ) {
            if ( $.MouseTracker.havePointerEvents ) {
                pointsList = tracker.getActivePointersListByType( gPoint.type );
                cachedGPoint = pointsList.getById( gPoint.id );
                if ( !cachedGPoint || !cachedGPoint.captured ) {
                    return;
                }
                try {
                    tracker.element.releasePointerCapture( gPoint.id );
                } catch ( e ) {
                }
            } else {
                tracker.element.releaseCapture();
            }
        } else {
            eventParams = getCaptureEventParams( tracker, $.MouseTracker.havePointerEvents ? 'pointerevent' : gPoint.type );
            if (isInIframe && canAccessEvents(window.top)) {
                $.removeEvent(
                    window.top,
                    eventParams.upName,
                    eventParams.upHandler,
                    true
                );
            }
            $.removeEvent(
                $.MouseTracker.captureElement,
                eventParams.moveName,
                eventParams.moveHandler,
                true
            );
            $.removeEvent(
                $.MouseTracker.captureElement,
                eventParams.upName,
                eventParams.upHandler,
                true
            );
        }
        updatePointerCaptured( tracker, gPoint, false );
    }
function releasePointer ( tracker , gPoint ) { var eventParams ; var pointsList ; var cachedGPoint ; if ( $ . MouseTracker . havePointerCapture ) { if ( $ . MouseTracker . havePointerEvents ) { pointsList = tracker . getActivePointersListByType ( gPoint . type ) ; cachedGPoint = pointsList . getById ( gPoint . id ) ; if ( ! cachedGPoint || ! cachedGPoint . captured ) { return ; } try { tracker . element . releasePointerCapture ( gPoint . id ) ; } catch ( e ) { } } else { tracker . element . releaseCapture ( ) ; } } else { eventParams = getCaptureEventParams ( tracker , $ . MouseTracker . havePointerEvents ? 'pointerevent' : gPoint . type ) ; if ( isInIframe && canAccessEvents ( window . top ) ) { $ . removeEvent ( window . top , eventParams . upName , eventParams . upHandler , true ) ; } $ . removeEvent ( $ . MouseTracker . captureElement , eventParams . moveName , eventParams . moveHandler , true ) ; $ . removeEvent ( $ . MouseTracker . captureElement , eventParams . upName , eventParams . upHandler , true ) ; } updatePointerCaptured ( tracker , gPoint , false ) ; }
Stop capturing pointer events to the tracked element.
Stop capturing pointer events to the tracked element .
// Can throw NotFoundError (InvalidPointerId Firefox < 82) //   (should never happen, but it does on Firefox 79 touch so we won't log a warning) //$.console.log('element.releasePointerCapture() called'); //$.console.warn('releasePointerCapture() called on invalid pointer ID'); //$.console.log('element.releaseCapture() called'); // Emulate mouse capture by hanging listeners on the document object. //    (Note we listen on the capture phase so the captured handlers will get called first) //$.console.log('Emulated mouse capture release'); // https://github.com/openseadragon/openseadragon/pull/790