mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-21 20:56:09 +03:00
Merge pull request #2553 from openseadragon/ms-IE11
More dropped support for IE11
This commit is contained in:
commit
c0655ba370
@ -3,7 +3,7 @@ OPENSEADRAGON CHANGELOG
|
||||
|
||||
5.0.0: (in progress...)
|
||||
|
||||
* BREAKING CHANGE: Dropped support for IE11 (#2300, #2361 @AndrewADev)
|
||||
* BREAKING CHANGE: Dropped support for IE11 (#2300, #2361, #2553 @AndrewADev, @msalsbery)
|
||||
* DEPRECATION: The OpenSeadragon.createCallback function is no longer recommended (#2367 @akansjain)
|
||||
* The viewer now uses WebGL when available (#2310, #2462, #2466, #2468, #2469, #2472, #2478, #2488, #2492, #2521, #2537 @pearcetm, @Aiosa, @thec0keman)
|
||||
* Added webp to supported image formats (#2455 @BeebBenjamin)
|
||||
|
13
package-lock.json
generated
13
package-lock.json
generated
@ -668,9 +668,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001456",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001456.tgz",
|
||||
"integrity": "sha512-XFHJY5dUgmpMV25UqaD4kVq2LsiaU5rS8fb0f17pCoXQiQslzmFgnfOxfvo1bTpTqf7dwG/N/05CnLCnOEKmzA==",
|
||||
"version": "1.0.30001636",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001636.tgz",
|
||||
"integrity": "sha512-bMg2vmr8XBsbL6Lr0UHXy/21m84FTxDLWn2FSqMd5PrlbMxwJlQnC2YWYxVgp66PZE+BBNF2jYQUBKCo1FDeZg==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@ -680,8 +680,13 @@
|
||||
{
|
||||
"type": "tidelift",
|
||||
"url": "https://tidelift.com/funding/github/npm/caniuse-lite"
|
||||
},
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
]
|
||||
],
|
||||
"license": "CC-BY-4.0"
|
||||
},
|
||||
"node_modules/chalk": {
|
||||
"version": "2.4.2",
|
||||
|
@ -48,4 +48,4 @@
|
||||
"test": "grunt test",
|
||||
"prepare": "grunt build"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -167,13 +167,6 @@ $.Button = function( options ) {
|
||||
this.imgDown.style.visibility =
|
||||
"hidden";
|
||||
|
||||
if ($.Browser.vendor === $.BROWSERS.FIREFOX && $.Browser.version < 3) {
|
||||
this.imgGroup.style.top =
|
||||
this.imgHover.style.top =
|
||||
this.imgDown.style.top =
|
||||
"";
|
||||
}
|
||||
|
||||
this.element.appendChild( this.imgRest );
|
||||
this.element.appendChild( this.imgGroup );
|
||||
this.element.appendChild( this.imgHover );
|
||||
|
@ -194,11 +194,7 @@ $.Control.prototype = {
|
||||
* @param {Number} opactiy - a value between 1 and 0 inclusively.
|
||||
*/
|
||||
setOpacity: function( opacity ) {
|
||||
if ( this.element[ $.SIGNAL ] && $.Browser.vendor === $.BROWSERS.IE ) {
|
||||
$.setElementOpacity( this.element, opacity, true );
|
||||
} else {
|
||||
$.setElementOpacity( this.wrapper, opacity, true );
|
||||
}
|
||||
$.setElementOpacity( this.wrapper, opacity, true );
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1116,10 +1116,9 @@
|
||||
/**
|
||||
* Detect available mouse wheel event name.
|
||||
*/
|
||||
$.MouseTracker.wheelEventName = ( $.Browser.vendor === $.BROWSERS.IE && $.Browser.version > 8 ) ||
|
||||
( 'onwheel' in document.createElement( 'div' ) ) ? 'wheel' : // Modern browsers support 'wheel'
|
||||
document.onmousewheel !== undefined ? 'mousewheel' : // Webkit and IE support at least 'mousewheel'
|
||||
'DOMMouseScroll'; // Assume old Firefox
|
||||
$.MouseTracker.wheelEventName = ( 'onwheel' in document.createElement( 'div' ) ) ? 'wheel' : // Modern browsers support 'wheel'
|
||||
document.onmousewheel !== undefined ? 'mousewheel' : // Webkit (and unsupported IE) support at least 'mousewheel'
|
||||
'DOMMouseScroll'; // Assume old Firefox (deprecated)
|
||||
|
||||
/**
|
||||
* Detect browser pointer device event model(s) and build appropriate list of events to subscribe to.
|
||||
@ -1132,7 +1131,7 @@
|
||||
}
|
||||
|
||||
if ( window.PointerEvent ) {
|
||||
// IE11 and other W3C Pointer Event implementations (see http://www.w3.org/TR/pointerevents)
|
||||
// W3C Pointer Event implementations (see http://www.w3.org/TR/pointerevents)
|
||||
$.MouseTracker.havePointerEvents = true;
|
||||
$.MouseTracker.subscribeEvents.push( "pointerenter", "pointerleave", "pointerover", "pointerout", "pointerdown", "pointerup", "pointermove", "pointercancel" );
|
||||
// Pointer events capture support
|
||||
@ -1671,7 +1670,6 @@
|
||||
|
||||
/**
|
||||
* Gets a W3C Pointer Events model compatible pointer type string from a DOM pointer event.
|
||||
* IE10 used a long integer value, but the W3C specification (and IE11+) use a string "mouse", "touch", "pen", etc.
|
||||
*
|
||||
* Note: Called for both pointer events and legacy mouse events
|
||||
* ($.MouseTracker.havePointerEvents determines which)
|
||||
@ -1679,14 +1677,7 @@
|
||||
* @inner
|
||||
*/
|
||||
function getPointerType( event ) {
|
||||
if ( $.MouseTracker.havePointerEvents ) {
|
||||
// Note: IE pointer events bug - sends invalid pointerType on lostpointercapture events
|
||||
// and possibly other events. We rely on sane, valid property values in DOM events, so for
|
||||
// IE, when the pointerType is missing, we'll default to 'mouse'...should be right most of the time
|
||||
return event.pointerType || (( $.Browser.vendor === $.BROWSERS.IE ) ? 'mouse' : '');
|
||||
} else {
|
||||
return 'mouse';
|
||||
}
|
||||
return $.MouseTracker.havePointerEvents && event.pointerType ? event.pointerType : 'mouse';
|
||||
}
|
||||
|
||||
|
||||
@ -2554,15 +2545,14 @@
|
||||
};
|
||||
|
||||
// Most browsers implicitly capture touch pointer events
|
||||
// Note no IE versions have element.hasPointerCapture() so no implicit
|
||||
// pointer capture possible
|
||||
// Note no IE versions (unsupported) have element.hasPointerCapture() so
|
||||
// no implicit pointer capture possible
|
||||
// var implicitlyCaptured = ($.MouseTracker.havePointerEvents &&
|
||||
// event.target.hasPointerCapture &&
|
||||
// $.Browser.vendor !== $.BROWSERS.IE) ?
|
||||
// event.target.hasPointerCapture(event.pointerId) : false;
|
||||
var implicitlyCaptured = $.MouseTracker.havePointerEvents &&
|
||||
gPoint.type === 'touch' &&
|
||||
$.Browser.vendor !== $.BROWSERS.IE;
|
||||
gPoint.type === 'touch';
|
||||
|
||||
//$.console.log('pointerdown ' + (tracker.userData ? tracker.userData.toString() : '') + ' ' + (event.target === tracker.element ? 'tracker.element' : ''));
|
||||
|
||||
|
@ -178,7 +178,6 @@ $.Navigator = function( options ){
|
||||
style['float'] = 'left'; //Webkit
|
||||
|
||||
style.cssFloat = 'left'; //Firefox
|
||||
style.styleFloat = 'left'; //IE
|
||||
style.zIndex = 999999999;
|
||||
style.cursor = 'default';
|
||||
style.boxSizing = 'content-box';
|
||||
|
@ -2343,43 +2343,18 @@ function OpenSeadragon( options ){
|
||||
/**
|
||||
* Create an XHR object
|
||||
* @private
|
||||
* @param {type} [local] If set to true, the XHR will be file: protocol
|
||||
* compatible if possible (but may raise a warning in the browser).
|
||||
* @param {type} [local] Deprecated. Ignored (IE/ActiveXObject file protocol no longer supported).
|
||||
* @returns {XMLHttpRequest}
|
||||
*/
|
||||
createAjaxRequest: function( local ) {
|
||||
// IE11 does not support window.ActiveXObject so we just try to
|
||||
// create one to see if it is supported.
|
||||
// See: http://msdn.microsoft.com/en-us/library/ie/dn423948%28v=vs.85%29.aspx
|
||||
var supportActiveX;
|
||||
try {
|
||||
/* global ActiveXObject:true */
|
||||
supportActiveX = !!new ActiveXObject( "Microsoft.XMLHTTP" );
|
||||
} catch( e ) {
|
||||
supportActiveX = false;
|
||||
}
|
||||
|
||||
if ( supportActiveX ) {
|
||||
if ( window.XMLHttpRequest ) {
|
||||
$.createAjaxRequest = function( local ) {
|
||||
if ( local ) {
|
||||
return new ActiveXObject( "Microsoft.XMLHTTP" );
|
||||
}
|
||||
return new XMLHttpRequest();
|
||||
};
|
||||
} else {
|
||||
$.createAjaxRequest = function() {
|
||||
return new ActiveXObject( "Microsoft.XMLHTTP" );
|
||||
};
|
||||
}
|
||||
} else if ( window.XMLHttpRequest ) {
|
||||
createAjaxRequest: function() {
|
||||
if ( window.XMLHttpRequest ) {
|
||||
$.createAjaxRequest = function() {
|
||||
return new XMLHttpRequest();
|
||||
};
|
||||
return new XMLHttpRequest();
|
||||
} else {
|
||||
throw new Error( "Browser doesn't support XMLHttpRequest." );
|
||||
}
|
||||
return $.createAjaxRequest( local );
|
||||
},
|
||||
|
||||
/**
|
||||
@ -2415,7 +2390,7 @@ function OpenSeadragon( options ){
|
||||
}
|
||||
|
||||
var protocol = $.getUrlProtocol( url );
|
||||
var request = $.createAjaxRequest( protocol === "file:" );
|
||||
var request = $.createAjaxRequest();
|
||||
|
||||
if ( !$.isFunction( onSuccess ) ) {
|
||||
throw new Error( "makeAjaxRequest requires a success callback" );
|
||||
@ -2584,17 +2559,6 @@ function OpenSeadragon( options ){
|
||||
return xmlDoc;
|
||||
};
|
||||
|
||||
} else if ( window.ActiveXObject ) {
|
||||
|
||||
$.parseXml = function( string ) {
|
||||
var xmlDoc = null;
|
||||
|
||||
xmlDoc = new ActiveXObject( "Microsoft.XMLDOM" );
|
||||
xmlDoc.async = false;
|
||||
xmlDoc.loadXML( string );
|
||||
return xmlDoc;
|
||||
};
|
||||
|
||||
} else {
|
||||
throw new Error( "Browser doesn't support XML DOM." );
|
||||
}
|
||||
@ -2721,6 +2685,10 @@ function OpenSeadragon( options ){
|
||||
//console.error( 'appVersion: ' + navigator.appVersion );
|
||||
//console.error( 'userAgent: ' + navigator.userAgent );
|
||||
|
||||
//TODO navigator.appName is deprecated. Should be 'Netscape' for all browsers
|
||||
// but could be dropped at any time
|
||||
// See https://developer.mozilla.org/en-US/docs/Web/API/Navigator/appName
|
||||
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent
|
||||
switch( navigator.appName ){
|
||||
case "Microsoft Internet Explorer":
|
||||
if( !!window.attachEvent &&
|
||||
@ -2806,8 +2774,8 @@ function OpenSeadragon( options ){
|
||||
//determine if this browser supports element.style.opacity
|
||||
$.Browser.opacity = true;
|
||||
|
||||
if ( $.Browser.vendor === $.BROWSERS.IE && $.Browser.version < 11 ) {
|
||||
$.console.error('Internet Explorer versions < 11 are not supported by OpenSeadragon');
|
||||
if ( $.Browser.vendor === $.BROWSERS.IE ) {
|
||||
$.console.error('Internet Explorer is not supported by OpenSeadragon');
|
||||
}
|
||||
})();
|
||||
|
||||
|
@ -193,7 +193,6 @@ $.ReferenceStrip = function ( options ) {
|
||||
element.style.display = 'inline';
|
||||
element.style['float'] = 'left'; //Webkit
|
||||
element.style.cssFloat = 'left'; //Firefox
|
||||
element.style.styleFloat = 'left'; //IE
|
||||
element.style.padding = '2px';
|
||||
$.setElementTouchActionNone( element );
|
||||
$.setElementPointerEventsNone( element );
|
||||
|
@ -1,4 +1,4 @@
|
||||
(function($, undefined) {
|
||||
(function($) {
|
||||
|
||||
/**
|
||||
* Plugin to force OpenSeadragon to use the legacy mouse pointer event model
|
||||
|
Loading…
Reference in New Issue
Block a user