Merge pull request #1466 from openseadragon/update

Updated to latest packages (and fixed lint errors)
This commit is contained in:
Ian Gilman 2018-05-15 10:10:28 -07:00 committed by GitHub
commit 541c7c5fe5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 4217 additions and 2440 deletions

View File

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

6614
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"
},
"devDependencies": {
"grunt": "^1.0.1",
"grunt": "^1.0.2",
"grunt-contrib-clean": "^1.1.0",
"grunt-contrib-compress": "^1.4.3",
"grunt-contrib-concat": "^1.0.1",
"grunt-contrib-connect": "^1.0.2",
"grunt-contrib-qunit": "^2.0.0",
"grunt-contrib-uglify": "^3.2.1",
"grunt-contrib-watch": "^1.0.0",
"grunt-eslint": "^19.0.0",
"grunt-git-describe": "^2.3.2",
"grunt-contrib-watch": "^1.1.0",
"grunt-eslint": "^20.1.0",
"grunt-git-describe": "^2.4.4",
"grunt-istanbul": "^0.8.0",
"grunt-text-replace": "^0.4.0",
"qunitjs": "2.4.1"

View File

@ -1499,7 +1499,7 @@ function OpenSeadragon( options ){
*/
getMousePosition: function( event ) {
if ( typeof( event.pageX ) == "number" ) {
if ( typeof ( event.pageX ) == "number" ) {
$.getMousePosition = function( event ){
var result = new $.Point();
@ -1509,7 +1509,7 @@ function OpenSeadragon( options ){
return result;
};
} else if ( typeof( event.clientX ) == "number" ) {
} else if ( typeof ( event.clientX ) == "number" ) {
$.getMousePosition = function( event ){
var result = new $.Point();
@ -1544,7 +1544,7 @@ function OpenSeadragon( options ){
var docElement = document.documentElement || {},
body = document.body || {};
if ( typeof( window.pageXOffset ) == "number" ) {
if ( typeof ( window.pageXOffset ) == "number" ) {
$.getPageScroll = function(){
return new $.Point(
window.pageXOffset,
@ -1633,7 +1633,7 @@ function OpenSeadragon( options ){
var docElement = document.documentElement || {},
body = document.body || {};
if ( typeof( window.innerWidth ) == 'number' ) {
if ( typeof ( window.innerWidth ) == 'number' ) {
$.getWindowSize = function(){
return new $.Point(
window.innerWidth,
@ -2233,7 +2233,7 @@ function OpenSeadragon( options ){
error messages are localized.
*/
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";
}

View File

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

View File

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

View File

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

View File

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

View File

@ -182,10 +182,10 @@ $.Viewer = function( 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.");
}
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
// the previous viewer with the same hash and now want to recreate it.
$.console.warn("Hash " + this.hash + " has already been used.");