Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions demos/touch-gestures/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,11 @@
// Prevent pan and zoom events from being handled after swipe ends.
function disableControlsTemporarily() {
viewer.controls().disableMethod('touchView');
viewer.controls().disableMethod('penView');
viewer.controls().disableMethod('pinch');
setTimeout(function() {
viewer.controls().enableMethod('touchView');
viewer.controls().enableMethod('penView');
viewer.controls().enableMethod('pinch');
}, 200);
}
Expand Down
4 changes: 3 additions & 1 deletion src/controls/registerDefaultControls.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ var defaultOptions = {
* - mouseViewDrag
* - mouseViewQtvr
* - touchView
* - penView
* - pinch
* - arrowKeys
* - plusMinusKeys
Expand All @@ -51,6 +52,7 @@ function registerDefaultControls(controls, element, opts) {
mouseViewDrag: new DragControlMethod(element, 'mouse'),
mouseViewQtvr: new QtvrControlMethod(element, 'mouse'),
touchView: new DragControlMethod(element, 'touch'),
penView: new DragControlMethod(element, 'pen'),
pinch: new PinchZoomControlMethod(element, 'touch'),

leftArrowKey: new KeyControlMethod(37, 'x', -0.7, 3),
Expand Down Expand Up @@ -80,7 +82,7 @@ function registerDefaultControls(controls, element, opts) {
};


var enabledControls = [ 'scrollZoom', 'touchView', 'pinch' ];
var enabledControls = [ 'scrollZoom', 'touchView', 'penView', 'pinch' ];
switch (opts.mouseViewMode) {
case 'drag':
enabledControls.push('mouseViewDrag');
Expand Down