diff --git a/Gruntfile.js b/Gruntfile.js index 2aa4b423..d526fabe 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -28,7 +28,7 @@ module.exports = function(grunt) { coverageDir = 'coverage/' + dateFormat(new Date(), 'yyyymmdd-HHMMss'), sources = [ "src/openseadragon.js", - "src/matrix.js", + "src/matrix3.js", "src/fullscreen.js", "src/eventsource.js", "src/mousetracker.js", diff --git a/src/drawerbase.js b/src/drawerbase.js index c976147f..ec0d52cd 100644 --- a/src/drawerbase.js +++ b/src/drawerbase.js @@ -241,7 +241,7 @@ $.DrawerBase = class DrawerBase{ // Internal utility functions /** - * * Calculate width and height of the canvas based on viewport dimensions + * Calculate width and height of the canvas based on viewport dimensions * and pixelDensityRatio * @private * @returns {OpenSeadragon.Point} {x, y} size of the canvas diff --git a/src/matrix.js b/src/matrix3.js similarity index 72% rename from src/matrix.js rename to src/matrix3.js index 129eab99..b4ba0f9b 100644 --- a/src/matrix.js +++ b/src/matrix3.js @@ -30,38 +30,41 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * - * + */ + + +/* * Portions of this source file are taken from WegGL Fundamentals: * - * # Copyright 2012, Gregg Tavares. - * # All rights reserved. - * # - * # Redistribution and use in source and binary forms, with or without - * # modification, are permitted provided that the following conditions are - * # met: - * # - * # * Redistributions of source code must retain the above copyright - * # notice, this list of conditions and the following disclaimer. - * # * Redistributions in binary form must reproduce the above - * # copyright notice, this list of conditions and the following disclaimer - * # in the documentation and/or other materials provided with the - * # distribution. - * # * Neither the name of Gregg Tavares. nor the names of his - * # contributors may be used to endorse or promote products derived from - * # this software without specific prior written permission. - * # - * # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * Copyright 2012, Gregg Tavares. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Gregg Tavares. nor the names of his + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * */ @@ -84,7 +87,6 @@ * **/ class Mat3{ - constructor(values){ if(!values) { values = [ @@ -93,13 +95,12 @@ class Mat3{ 0, 0, 0 ]; } - this.values = values; } /** - * @alias makeIdentity - * @memberof! OpenSeadragon.Mat3 + * @function makeIdentity + * @memberof OpenSeadragon.Mat3 * @static * @returns {OpenSeadragon.Mat3} an identity matrix */ @@ -112,8 +113,8 @@ class Mat3{ } /** - * @alias makeTranslation - * @memberof! OpenSeadragon.Mat3 + * @function makeTranslation + * @memberof OpenSeadragon.Mat3 * @static * @param {Number} tx The x value of the translation * @param {Number} ty The y value of the translation @@ -128,8 +129,8 @@ class Mat3{ } /** - * @alias makeRotation - * @memberof! OpenSeadragon.Mat3 + * @function makeRotation + * @memberof OpenSeadragon.Mat3 * @static * @param {Number} angleInRadians The desired rotation angle, in radians * @returns {OpenSeadragon.Mat3} A rotation matrix @@ -145,8 +146,8 @@ class Mat3{ } /** - * @alias makeScaling - * @memberof! OpenSeadragon.Mat3 + * @function makeScaling + * @memberof OpenSeadragon.Mat3 * @static * @param {Number} sx The x value of the scaling * @param {Number} sy The y value of the scaling diff --git a/src/openseadragon.js b/src/openseadragon.js index 66cf70a5..b6189f61 100644 --- a/src/openseadragon.js +++ b/src/openseadragon.js @@ -518,7 +518,7 @@ * Milliseconds to wait after each tile retry if tileRetryMax is set. * * @property {Boolean} [useCanvas=true] - * Deprecated. Use options.drawer to specify preferred renderer. + * Deprecated. Use the `drawer` option to specify preferred renderer. * * @property {Number} [minPixelRatio=0.5] * The higher the minPixelRatio, the lower the quality of the image that diff --git a/src/referencestrip.js b/src/referencestrip.js index bcf2cc85..d221bce4 100644 --- a/src/referencestrip.js +++ b/src/referencestrip.js @@ -46,7 +46,7 @@ var THIS = {}; * * This idea is a reexpression of the idea of dzi collections * which allows a clearer algorithm to reuse the tile sources already - * supported by OpenSeadragon, in heterogenious or homogenious + * supported by OpenSeadragon, in heterogeneous or homogeneous * sequences just like mixed groups already supported by the viewer * for the purpose of image sequnces. * @@ -455,7 +455,7 @@ function loadPanels( strip, viewerSize, scroll ) { animationTime: 0, loadTilesWithAjax: strip.viewer.loadTilesWithAjax, ajaxHeaders: strip.viewer.ajaxHeaders, - drawer: strip.viewer.drawer.constructor, + drawer: strip.viewer.drawer.constructor, //use the same drawer as the main viewer } ); // Allow pointer events to pass through miniViewer's canvas/container // elements so implicit pointer capture works on touch devices