mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 13:16:10 +03:00
Merge branch 'master' into mousetracker_defaulton
Conflicts: changelog.txt src/navigator.js
This commit is contained in:
commit
1da57564df
@ -21,6 +21,8 @@ OPENSEADRAGON CHANGELOG
|
|||||||
* Arrow key navigation fixed across platforms (#565)
|
* Arrow key navigation fixed across platforms (#565)
|
||||||
* Removed textarea element from viewer DOM. Viewer.canvas now handles keyboard navigation (#569)
|
* Removed textarea element from viewer DOM. Viewer.canvas now handles keyboard navigation (#569)
|
||||||
* Removed 'position' property from MouseTracker keyDownHandler/keyUpHandler/keyHandler functions (#573)
|
* Removed 'position' property from MouseTracker keyDownHandler/keyUpHandler/keyHandler functions (#573)
|
||||||
|
* Fixed pointer event model detection for IE 10 and IE 11 (#571)
|
||||||
|
* Added setMouseNavEnabled() support to Navigator (#572)
|
||||||
* MouseTracker now defaults to tracking on (#558)
|
* MouseTracker now defaults to tracking on (#558)
|
||||||
|
|
||||||
1.2.0:
|
1.2.0:
|
||||||
|
@ -983,7 +983,8 @@
|
|||||||
$.MouseTracker.subscribeEvents.push( "MozMousePixelScroll" );
|
$.MouseTracker.subscribeEvents.push( "MozMousePixelScroll" );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( window.PointerEvent ) {
|
// Note: window.navigator.pointerEnable is deprecated on IE 11 and not part of W3C spec.
|
||||||
|
if ( window.PointerEvent && ( window.navigator.pointerEnabled || $.Browser.vendor !== $.BROWSERS.IE ) ) {
|
||||||
// IE11 and other W3C Pointer Event implementations (see http://www.w3.org/TR/pointerevents)
|
// IE11 and other W3C Pointer Event implementations (see http://www.w3.org/TR/pointerevents)
|
||||||
$.MouseTracker.havePointerEvents = true;
|
$.MouseTracker.havePointerEvents = true;
|
||||||
$.MouseTracker.subscribeEvents.push( "pointerover", "pointerout", "pointerdown", "pointerup", "pointermove", "pointercancel" );
|
$.MouseTracker.subscribeEvents.push( "pointerover", "pointerout", "pointerdown", "pointerup", "pointermove", "pointercancel" );
|
||||||
@ -994,7 +995,7 @@
|
|||||||
$.MouseTracker.maxTouchPoints = 0;
|
$.MouseTracker.maxTouchPoints = 0;
|
||||||
}
|
}
|
||||||
$.MouseTracker.haveMouseEnter = false;
|
$.MouseTracker.haveMouseEnter = false;
|
||||||
} else if ( window.MSPointerEvent ) {
|
} else if ( window.MSPointerEvent && window.navigator.msPointerEnabled ) {
|
||||||
// IE10
|
// IE10
|
||||||
$.MouseTracker.havePointerEvents = true;
|
$.MouseTracker.havePointerEvents = true;
|
||||||
$.MouseTracker.subscribeEvents.push( "MSPointerOver", "MSPointerOut", "MSPointerDown", "MSPointerUp", "MSPointerMove", "MSPointerCancel" );
|
$.MouseTracker.subscribeEvents.push( "MSPointerOver", "MSPointerOut", "MSPointerDown", "MSPointerUp", "MSPointerMove", "MSPointerCancel" );
|
||||||
|
@ -52,8 +52,7 @@ $.Navigator = function( options ){
|
|||||||
var viewer = options.viewer,
|
var viewer = options.viewer,
|
||||||
_this = this,
|
_this = this,
|
||||||
viewerSize,
|
viewerSize,
|
||||||
navigatorSize,
|
navigatorSize;
|
||||||
unneededElement;
|
|
||||||
|
|
||||||
//We may need to create a new element and id if they did not
|
//We may need to create a new element and id if they did not
|
||||||
//provide the id for the existing element
|
//provide the id for the existing element
|
||||||
@ -168,25 +167,6 @@ $.Navigator = function( options ){
|
|||||||
this.displayRegionContainer.style.width = "100%";
|
this.displayRegionContainer.style.width = "100%";
|
||||||
this.displayRegionContainer.style.height = "100%";
|
this.displayRegionContainer.style.height = "100%";
|
||||||
|
|
||||||
this.element.innerTracker = new $.MouseTracker({
|
|
||||||
element: this.element,
|
|
||||||
dragHandler: $.delegate( this, onCanvasDrag ),
|
|
||||||
clickHandler: $.delegate( this, onCanvasClick ),
|
|
||||||
releaseHandler: $.delegate( this, onCanvasRelease ),
|
|
||||||
scrollHandler: $.delegate( this, onCanvasScroll )
|
|
||||||
});
|
|
||||||
|
|
||||||
/*this.displayRegion.outerTracker = new $.MouseTracker({
|
|
||||||
element: this.container,
|
|
||||||
startDisabled: this.mouseNavEnabled ? false : true,
|
|
||||||
clickTimeThreshold: this.clickTimeThreshold,
|
|
||||||
clickDistThreshold: this.clickDistThreshold,
|
|
||||||
enterHandler: $.delegate( this, onContainerEnter ),
|
|
||||||
exitHandler: $.delegate( this, onContainerExit ),
|
|
||||||
releaseHandler: $.delegate( this, onContainerRelease )
|
|
||||||
});*/
|
|
||||||
|
|
||||||
|
|
||||||
viewer.addControl(
|
viewer.addControl(
|
||||||
this.element,
|
this.element,
|
||||||
options.controlOptions
|
options.controlOptions
|
||||||
@ -212,10 +192,6 @@ $.Navigator = function( options ){
|
|||||||
|
|
||||||
this.displayRegionContainer.appendChild(this.displayRegion);
|
this.displayRegionContainer.appendChild(this.displayRegion);
|
||||||
this.element.getElementsByTagName('div')[0].appendChild(this.displayRegionContainer);
|
this.element.getElementsByTagName('div')[0].appendChild(this.displayRegionContainer);
|
||||||
unneededElement = this.element.getElementsByTagName('textarea')[0];
|
|
||||||
if (unneededElement) {
|
|
||||||
unneededElement.parentNode.removeChild(unneededElement);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (options.navigatorRotate)
|
if (options.navigatorRotate)
|
||||||
{
|
{
|
||||||
@ -224,8 +200,18 @@ $.Navigator = function( options ){
|
|||||||
_setTransformRotate(_this.displayRegion, -args.degrees);
|
_setTransformRotate(_this.displayRegion, -args.degrees);
|
||||||
_this.viewport.setRotation(args.degrees);
|
_this.viewport.setRotation(args.degrees);
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove the base class' (Viewer's) innerTracker and replace it with our own
|
||||||
|
this.innerTracker.destroy();
|
||||||
|
this.innerTracker = new $.MouseTracker({
|
||||||
|
element: this.element,
|
||||||
|
dragHandler: $.delegate( this, onCanvasDrag ),
|
||||||
|
clickHandler: $.delegate( this, onCanvasClick ),
|
||||||
|
releaseHandler: $.delegate( this, onCanvasRelease ),
|
||||||
|
scrollHandler: $.delegate( this, onCanvasScroll )
|
||||||
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$.extend( $.Navigator.prototype, $.EventSource.prototype, $.Viewer.prototype, /** @lends OpenSeadragon.Navigator.prototype */{
|
$.extend( $.Navigator.prototype, $.EventSource.prototype, $.Viewer.prototype, /** @lends OpenSeadragon.Navigator.prototype */{
|
||||||
|
Loading…
Reference in New Issue
Block a user