Some issues solved

This commit is contained in:
Jose 2017-02-20 20:23:25 +01:00
parent d5b62aabcd
commit 70bdc8839e
7 changed files with 16 additions and 23 deletions

View File

@ -8,10 +8,6 @@
"off", "off",
4 4
], ],
//"linebreak-style": [
// "error",
// "unix"
//],
"quotes": [ "quotes": [
"off", "off",
"double" "double"

View File

@ -870,12 +870,12 @@
* @memberof OpenSeadragon.MouseTracker * @memberof OpenSeadragon.MouseTracker
*/ */
$.MouseTracker.resetAllMouseTrackers = function(){ $.MouseTracker.resetAllMouseTrackers = function(){
MOUSETRACKERS.forEach(function(mt){ for(var i = 0; i < MOUSETRACKERS.length; i++){
if (mt.isTracking()){ if (MOUSETRACKERS[i].isTracking()){
mt.setTracking(false); MOUSETRACKERS[i].setTracking(false);
mt.setTracking(true); MOUSETRACKERS[i].setTracking(true);
} }
}); }
}; };
/** /**

View File

@ -2530,7 +2530,6 @@ function onCanvasDblClick( event ) {
}); });
} }
// Modified to improve constrained panning
function onCanvasDrag( event ) { function onCanvasDrag( event ) {
var gestureSettings; var gestureSettings;
@ -2546,14 +2545,14 @@ function onCanvasDrag( event ) {
if( this.constrainDuringPan ){ if( this.constrainDuringPan ){
var delta = this.viewport.deltaPointsFromPixels( event.delta.negate() ); var delta = this.viewport.deltaPointsFromPixels( event.delta.negate() );
this["viewport"].centerSpringX.target.value += delta.x; this.viewport.centerSpringX.target.value += delta.x;
this["viewport"].centerSpringY.target.value += delta.y; this.viewport.centerSpringY.target.value += delta.y;
var bounds = this.viewport.getBounds(); var bounds = this.viewport.getBounds();
var constrainedBounds = this.viewport.getConstrainedBounds(); var constrainedBounds = this.viewport.getConstrainedBounds();
this["viewport"].centerSpringX.target.value -= delta.x; this.viewport.centerSpringX.target.value -= delta.x;
this["viewport"].centerSpringY.target.value -= delta.y; this.viewport.centerSpringY.target.value -= delta.y;
if (bounds.x != constrainedBounds.x) { if (bounds.x != constrainedBounds.x) {
event.delta.x = 0; event.delta.x = 0;

View File

@ -734,7 +734,7 @@ $.Viewport.prototype = {
/** /**
* Returns bounds taking constrains into account * Returns bounds taking constraints into account
* Added to improve constrained panning * Added to improve constrained panning
* @param {Boolean} immediately * @param {Boolean} immediately
* @return {OpenSeadragon.Viewport} Chainable. * @return {OpenSeadragon.Viewport} Chainable.

View File

@ -1,8 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>CartoWall Climbing Topo</title> <title>Iframe example embed</title>
<script type="text/javascript" src='../../build/openseadragon/openseadragon.js'></script> <script type="text/javascript" src='../../build/openseadragon/openseadragon.js'></script>

View File

@ -1,8 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>CartoWall Climbing Topo</title> <title>Iframe example</title>
<script type="text/javascript" src='../../build/openseadragon/openseadragon.js'></script> <script type="text/javascript" src='../../build/openseadragon/openseadragon.js'></script>
@ -14,6 +13,6 @@
</head> </head>
<body> <body>
<iframe src="embed.html" frameborder="0" width="560" height="315" allowfullscreen></iframe> <iframe src="iframe-embed.html" frameborder="0" width="560" height="315" allowfullscreen></iframe>
</body> </body>
</html> </html>