diff --git a/src/control.js b/src/control.js index 43abf65c..43fa921b 100644 --- a/src/control.js +++ b/src/control.js @@ -74,6 +74,7 @@ $.ControlAnchor = { * @param {Element} container - the element to control will be anchored too. */ $.Control = function ( element, options, container ) { + var parent = element.parentNode; if (typeof options === 'number') { @@ -150,6 +151,8 @@ $.Control = function ( element, options, container ) { } else { parent.appendChild( this.wrapper ); } + + this.wrapper.style.display = "none"; }; /** @lends OpenSeadragon.Control.prototype */ diff --git a/src/viewer.js b/src/viewer.js index a9a139ad..165f47da 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -2993,7 +2993,7 @@ function onCanvasDrag( event ) { gestureSettings = this.gestureSettingsByDeviceType( event.pointerType ); if (gestureSettings.dblClickToZoom && THIS[ this.hash ].draggingToZoom){ - var factor = Math.pow( this.zoomPerDblTapDrag, event.delta.y / 100 ); + var factor = Math.pow( this.zoomPerDblTapDrag, event.delta.y ); this.viewport.zoomBy(factor); this.viewport.applyConstraints(); } diff --git a/test/demo/collections/index.html b/test/demo/collections/index.html index 46b4e7f2..4074babc 100644 --- a/test/demo/collections/index.html +++ b/test/demo/collections/index.html @@ -23,6 +23,23 @@ background-color: rgba(255, 0, 0, 0.3); } + [title ='Zoom in'] { + display: none; + } + + [title ='Zoom out'] { + display: none; + } + + [title ='Go home'] { + display: none; + } + + [title ='Toggle full page'] { + display: none; + } + +