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",
4
],
//"linebreak-style": [
// "error",
// "unix"
//],
"quotes": [
"off",
"double"

View File

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

View File

@ -2530,7 +2530,6 @@ function onCanvasDblClick( event ) {
});
}
// Modified to improve constrained panning
function onCanvasDrag( event ) {
var gestureSettings;
@ -2546,14 +2545,14 @@ function onCanvasDrag( event ) {
if( this.constrainDuringPan ){
var delta = this.viewport.deltaPointsFromPixels( event.delta.negate() );
this["viewport"].centerSpringX.target.value += delta.x;
this["viewport"].centerSpringY.target.value += delta.y;
this.viewport.centerSpringX.target.value += delta.x;
this.viewport.centerSpringY.target.value += delta.y;
var bounds = this.viewport.getBounds();
var constrainedBounds = this.viewport.getConstrainedBounds();
this["viewport"].centerSpringX.target.value -= delta.x;
this["viewport"].centerSpringY.target.value -= delta.y;
this.viewport.centerSpringX.target.value -= delta.x;
this.viewport.centerSpringY.target.value -= delta.y;
if (bounds.x != constrainedBounds.x) {
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
* @param {Boolean} immediately
* @return {OpenSeadragon.Viewport} Chainable.

View File

@ -45,4 +45,4 @@
});
</script>
</body>
</html>
</html>

View File

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

View File

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