mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 05:06:09 +03:00
IE specific patch for navigator (styleFloat), also keyboard accessibility patches for firefox
This commit is contained in:
parent
2e821a7dc6
commit
825023aaf6
@ -6,7 +6,7 @@
|
||||
PROJECT: openseadragon
|
||||
BUILD_MAJOR: 0
|
||||
BUILD_MINOR: 9
|
||||
BUILD_ID: 34
|
||||
BUILD_ID: 36
|
||||
BUILD: ${PROJECT}.${BUILD_MAJOR}.${BUILD_MINOR}.${BUILD_ID}
|
||||
VERSION: ${BUILD_MAJOR}.${BUILD_MINOR}.${BUILD_ID}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @version OpenSeadragon 0.9.34
|
||||
* @version OpenSeadragon 0.9.36
|
||||
*
|
||||
* @fileOverview
|
||||
* <h2>
|
||||
@ -2206,13 +2206,16 @@ $.EventHandler.prototype = {
|
||||
*/
|
||||
function onKeyPress( tracker, event ){
|
||||
//console.log( "keypress %s", event.keyCode );
|
||||
var propagate;
|
||||
if ( tracker.keyHandler ) {
|
||||
try {
|
||||
tracker.keyHandler(
|
||||
propagate = tracker.keyHandler(
|
||||
tracker,
|
||||
event.keyCode
|
||||
);
|
||||
$.cancelEvent( event );
|
||||
if( !propagate ){
|
||||
$.cancelEvent( event );
|
||||
}
|
||||
} catch ( e ) {
|
||||
$.console.error(
|
||||
"%s while executing key handler: %s",
|
||||
@ -4208,7 +4211,7 @@ $.Navigator = function( options ){
|
||||
style.background = 'transparent';
|
||||
style.float = 'left'; //Webkit
|
||||
style.cssFloat = 'left'; //Firefox
|
||||
style.floatStyle = 'left'; //IE
|
||||
style.styleFloat = 'left'; //IE
|
||||
style.zIndex = 999999999;
|
||||
}( this.displayRegion.style ));
|
||||
|
||||
@ -4235,29 +4238,33 @@ $.Navigator = function( options ){
|
||||
//console.log( keyCode );
|
||||
switch( keyCode ){
|
||||
case 119://w
|
||||
case 38://up arrow
|
||||
_this.viewer.viewport.panBy(new $.Point(0, -0.05));
|
||||
break;
|
||||
return false;
|
||||
case 115://s
|
||||
case 40://down arrow
|
||||
_this.viewer.viewport.panBy(new $.Point(0, 0.05));
|
||||
break;
|
||||
return false;
|
||||
case 97://a
|
||||
case 37://left arrow
|
||||
_this.viewer.viewport.panBy(new $.Point(-0.05, 0));
|
||||
break;
|
||||
return false;
|
||||
case 100://d
|
||||
case 39://right arrow
|
||||
_this.viewer.viewport.panBy(new $.Point(0.05, 0));
|
||||
break;
|
||||
return false;
|
||||
case 61://=|+
|
||||
_this.viewer.viewport.zoomBy(1.1);
|
||||
break;
|
||||
return false;
|
||||
case 45://-|_
|
||||
_this.viewer.viewport.zoomBy(0.9);
|
||||
break;
|
||||
return false;
|
||||
case 48://0|)
|
||||
_this.viewer.viewport.goHome();
|
||||
break;
|
||||
return false;
|
||||
default:
|
||||
//console.log( 'navigator keycode %s', keyCode );
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}).setTracking( true ); // default state
|
||||
@ -5124,9 +5131,13 @@ $.Button = function( options ) {
|
||||
},
|
||||
|
||||
keyHandler: function( tracker, key ){
|
||||
//console.log( "%s : handling key!", _this.tooltip);
|
||||
_this.raiseEvent( "onClick", _this );
|
||||
_this.raiseEvent( "onRelease", _this );
|
||||
//console.log( "%s : handling key %s!", _this.tooltip, key);
|
||||
if( 13 === key ){
|
||||
_this.raiseEvent( "onClick", _this );
|
||||
_this.raiseEvent( "onRelease", _this );
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}).setTracking( true );
|
||||
|
@ -189,9 +189,13 @@ $.Button = function( options ) {
|
||||
},
|
||||
|
||||
keyHandler: function( tracker, key ){
|
||||
//console.log( "%s : handling key!", _this.tooltip);
|
||||
_this.raiseEvent( "onClick", _this );
|
||||
_this.raiseEvent( "onRelease", _this );
|
||||
//console.log( "%s : handling key %s!", _this.tooltip, key);
|
||||
if( 13 === key ){
|
||||
_this.raiseEvent( "onClick", _this );
|
||||
_this.raiseEvent( "onRelease", _this );
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}).setTracking( true );
|
||||
|
@ -529,13 +529,16 @@
|
||||
*/
|
||||
function onKeyPress( tracker, event ){
|
||||
//console.log( "keypress %s", event.keyCode );
|
||||
var propagate;
|
||||
if ( tracker.keyHandler ) {
|
||||
try {
|
||||
tracker.keyHandler(
|
||||
propagate = tracker.keyHandler(
|
||||
tracker,
|
||||
event.keyCode
|
||||
);
|
||||
$.cancelEvent( event );
|
||||
if( !propagate ){
|
||||
$.cancelEvent( event );
|
||||
}
|
||||
} catch ( e ) {
|
||||
$.console.error(
|
||||
"%s while executing key handler: %s",
|
||||
|
@ -60,7 +60,7 @@ $.Navigator = function( options ){
|
||||
style.background = 'transparent';
|
||||
style.float = 'left'; //Webkit
|
||||
style.cssFloat = 'left'; //Firefox
|
||||
style.floatStyle = 'left'; //IE
|
||||
style.styleFloat = 'left'; //IE
|
||||
style.zIndex = 999999999;
|
||||
}( this.displayRegion.style ));
|
||||
|
||||
@ -87,29 +87,33 @@ $.Navigator = function( options ){
|
||||
//console.log( keyCode );
|
||||
switch( keyCode ){
|
||||
case 119://w
|
||||
case 38://up arrow
|
||||
_this.viewer.viewport.panBy(new $.Point(0, -0.05));
|
||||
break;
|
||||
return false;
|
||||
case 115://s
|
||||
case 40://down arrow
|
||||
_this.viewer.viewport.panBy(new $.Point(0, 0.05));
|
||||
break;
|
||||
return false;
|
||||
case 97://a
|
||||
case 37://left arrow
|
||||
_this.viewer.viewport.panBy(new $.Point(-0.05, 0));
|
||||
break;
|
||||
return false;
|
||||
case 100://d
|
||||
case 39://right arrow
|
||||
_this.viewer.viewport.panBy(new $.Point(0.05, 0));
|
||||
break;
|
||||
return false;
|
||||
case 61://=|+
|
||||
_this.viewer.viewport.zoomBy(1.1);
|
||||
break;
|
||||
return false;
|
||||
case 45://-|_
|
||||
_this.viewer.viewport.zoomBy(0.9);
|
||||
break;
|
||||
return false;
|
||||
case 48://0|)
|
||||
_this.viewer.viewport.goHome();
|
||||
break;
|
||||
return false;
|
||||
default:
|
||||
//console.log( 'navigator keycode %s', keyCode );
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}).setTracking( true ); // default state
|
||||
|
Loading…
Reference in New Issue
Block a user