Updated to latest packages (and fixed lint errors)

This commit is contained in:
Ian Gilman 2018-05-11 10:53:16 -07:00
parent ceb828dd06
commit 24be785bbd
9 changed files with 3535 additions and 1666 deletions

View File

@ -50,6 +50,7 @@
"no-multi-spaces": [ "no-multi-spaces": [
"error", "error",
{ {
"ignoreEOLComments": true,
"exceptions": { "exceptions": {
"Property": true, "Property": true,
"VariableDeclarator": true, "VariableDeclarator": true,
@ -259,7 +260,7 @@
"space-unary-ops": [ "space-unary-ops": [
"error", "error",
{ {
"words": false, "words": true,
"nonwords": false "nonwords": false
} }
], ],

5158
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -28,16 +28,16 @@
"url": "https://github.com/openseadragon/openseadragon.git" "url": "https://github.com/openseadragon/openseadragon.git"
}, },
"devDependencies": { "devDependencies": {
"grunt": "^1.0.1", "grunt": "^1.0.2",
"grunt-contrib-clean": "^1.1.0", "grunt-contrib-clean": "^1.1.0",
"grunt-contrib-compress": "^1.4.3", "grunt-contrib-compress": "^1.4.3",
"grunt-contrib-concat": "^1.0.1", "grunt-contrib-concat": "^1.0.1",
"grunt-contrib-connect": "^1.0.2", "grunt-contrib-connect": "^1.0.2",
"grunt-contrib-qunit": "^2.0.0", "grunt-contrib-qunit": "^2.0.0",
"grunt-contrib-uglify": "^3.2.1", "grunt-contrib-uglify": "^3.2.1",
"grunt-contrib-watch": "^1.0.0", "grunt-contrib-watch": "^1.0.1",
"grunt-eslint": "^19.0.0", "grunt-eslint": "^20.1.0",
"grunt-git-describe": "^2.3.2", "grunt-git-describe": "^2.4.4",
"grunt-istanbul": "^0.8.0", "grunt-istanbul": "^0.8.0",
"grunt-text-replace": "^0.4.0", "grunt-text-replace": "^0.4.0",
"qunitjs": "2.4.1" "qunitjs": "2.4.1"

View File

@ -1499,7 +1499,7 @@ function OpenSeadragon( options ){
*/ */
getMousePosition: function( event ) { getMousePosition: function( event ) {
if ( typeof( event.pageX ) == "number" ) { if ( typeof ( event.pageX ) == "number" ) {
$.getMousePosition = function( event ){ $.getMousePosition = function( event ){
var result = new $.Point(); var result = new $.Point();
@ -1509,7 +1509,7 @@ function OpenSeadragon( options ){
return result; return result;
}; };
} else if ( typeof( event.clientX ) == "number" ) { } else if ( typeof ( event.clientX ) == "number" ) {
$.getMousePosition = function( event ){ $.getMousePosition = function( event ){
var result = new $.Point(); var result = new $.Point();
@ -1544,7 +1544,7 @@ function OpenSeadragon( options ){
var docElement = document.documentElement || {}, var docElement = document.documentElement || {},
body = document.body || {}; body = document.body || {};
if ( typeof( window.pageXOffset ) == "number" ) { if ( typeof ( window.pageXOffset ) == "number" ) {
$.getPageScroll = function(){ $.getPageScroll = function(){
return new $.Point( return new $.Point(
window.pageXOffset, window.pageXOffset,
@ -1633,7 +1633,7 @@ function OpenSeadragon( options ){
var docElement = document.documentElement || {}, var docElement = document.documentElement || {},
body = document.body || {}; body = document.body || {};
if ( typeof( window.innerWidth ) == 'number' ) { if ( typeof ( window.innerWidth ) == 'number' ) {
$.getWindowSize = function(){ $.getWindowSize = function(){
return new $.Point( return new $.Point(
window.innerWidth, window.innerWidth,
@ -2233,7 +2233,7 @@ function OpenSeadragon( options ){
error messages are localized. error messages are localized.
*/ */
var oldIE = $.Browser.vendor == $.BROWSERS.IE && $.Browser.version < 10; var oldIE = $.Browser.vendor == $.BROWSERS.IE && $.Browser.version < 10;
if ( oldIE && typeof( e.number ) != "undefined" && e.number == -2147024891 ) { if ( oldIE && typeof ( e.number ) != "undefined" && e.number == -2147024891 ) {
msg += "\nSee http://msdn.microsoft.com/en-us/library/ms537505(v=vs.85).aspx#xdomain"; msg += "\nSee http://msdn.microsoft.com/en-us/library/ms537505(v=vs.85).aspx#xdomain";
} }

View File

@ -58,27 +58,27 @@ $.Rect = function(x, y, width, height, degrees) {
* @member {Number} x * @member {Number} x
* @memberof OpenSeadragon.Rect# * @memberof OpenSeadragon.Rect#
*/ */
this.x = typeof(x) === "number" ? x : 0; this.x = typeof (x) === "number" ? x : 0;
/** /**
* The vector component 'y'. * The vector component 'y'.
* @member {Number} y * @member {Number} y
* @memberof OpenSeadragon.Rect# * @memberof OpenSeadragon.Rect#
*/ */
this.y = typeof(y) === "number" ? y : 0; this.y = typeof (y) === "number" ? y : 0;
/** /**
* The vector component 'width'. * The vector component 'width'.
* @member {Number} width * @member {Number} width
* @memberof OpenSeadragon.Rect# * @memberof OpenSeadragon.Rect#
*/ */
this.width = typeof(width) === "number" ? width : 0; this.width = typeof (width) === "number" ? width : 0;
/** /**
* The vector component 'height'. * The vector component 'height'.
* @member {Number} height * @member {Number} height
* @memberof OpenSeadragon.Rect# * @memberof OpenSeadragon.Rect#
*/ */
this.height = typeof(height) === "number" ? height : 0; this.height = typeof (height) === "number" ? height : 0;
this.degrees = typeof(degrees) === "number" ? degrees : 0; this.degrees = typeof (degrees) === "number" ? degrees : 0;
// Normalizes the rectangle. // Normalizes the rectangle.
this.degrees = $.positiveModulo(this.degrees, 360); this.degrees = $.positiveModulo(this.degrees, 360);

View File

@ -50,7 +50,7 @@
$.Spring = function( options ) { $.Spring = function( options ) {
var args = arguments; var args = arguments;
if( typeof( options ) != 'object' ){ if( typeof ( options ) != 'object' ){
//allows backward compatible use of ( initialValue, config ) as //allows backward compatible use of ( initialValue, config ) as
//constructor parameters //constructor parameters
options = { options = {

View File

@ -81,7 +81,7 @@ $.extend( $, /** @lends OpenSeadragon */{
} }
string = container[ props[ i ] ]; string = container[ props[ i ] ];
if ( typeof( string ) != "string" ) { if ( typeof ( string ) != "string" ) {
$.console.log( "Untranslated source string:", prop ); $.console.log( "Untranslated source string:", prop );
string = ""; // FIXME: this breaks gettext()-style convention, which would return source string = ""; // FIXME: this breaks gettext()-style convention, which would return source
} }

View File

@ -427,7 +427,7 @@ $.TileSource.prototype = {
} }
callback = function( data ){ callback = function( data ){
if( typeof(data) === "string" ) { if( typeof (data) === "string" ) {
data = $.parseXml( data ); data = $.parseXml( data );
} }
var $TileSource = $.TileSource.determineType( _this, data, url ); var $TileSource = $.TileSource.determineType( _this, data, url );
@ -500,7 +500,7 @@ $.TileSource.prototype = {
msg = "HTTP " + xhr.status + " attempting to load TileSource"; msg = "HTTP " + xhr.status + " attempting to load TileSource";
} catch ( e ) { } catch ( e ) {
var formattedExc; var formattedExc;
if ( typeof( exc ) == "undefined" || !exc.toString ) { if ( typeof ( exc ) == "undefined" || !exc.toString ) {
formattedExc = "Unknown error"; formattedExc = "Unknown error";
} else { } else {
formattedExc = exc.toString(); formattedExc = exc.toString();

View File

@ -182,10 +182,10 @@ $.Viewer = function( options ) {
}, $.DEFAULT_SETTINGS, options ); }, $.DEFAULT_SETTINGS, options );
if ( typeof( this.hash) === "undefined" ) { if ( typeof ( this.hash) === "undefined" ) {
throw new Error("A hash must be defined, either by specifying options.id or options.hash."); throw new Error("A hash must be defined, either by specifying options.id or options.hash.");
} }
if ( typeof( THIS[ this.hash ] ) !== "undefined" ) { if ( typeof ( THIS[ this.hash ] ) !== "undefined" ) {
// We don't want to throw an error here, as the user might have discarded // We don't want to throw an error here, as the user might have discarded
// the previous viewer with the same hash and now want to recreate it. // the previous viewer with the same hash and now want to recreate it.
$.console.warn("Hash " + this.hash + " has already been used."); $.console.warn("Hash " + this.hash + " has already been used.");