Преглед на файлове

Disable `ctrl` / `shift` zoom when `ctrl` is required for mouse wheel zoom.

pull/952/head
Matthew Petroff преди 3 години
родител
ревизия
e601519157
променени са 2 файла, в които са добавени 6 реда и са изтрити 1 реда
  1. +2
    -1
      doc/json-config-parameters.md
  2. +4
    -0
      src/js/pannellum.js

+ 2
- 1
doc/json-config-parameters.md Целия файл

@@ -101,7 +101,8 @@ If set to `false`, zooming with mouse wheel will be disabled. Defaults to `true`
Can also be set to `fullscreenonly`, in which case it is only enabled when the
viewer is fullscreen. Can also be set to `ctrl`, in which case the `ctrl` key
must be held down to zoom with the mouse wheel (except while the viewer is
fullscreen).
fullscreen); when the `ctrl` key is required for mouse wheel zooming, the use
of `ctrl` / `shift` for zoom control is disabled.


### `doubleClickZoom` (boolean)


+ 4
- 0
src/js/pannellum.js Целия файл

@@ -1177,6 +1177,10 @@ function onDocumentKeyPress(event) {
// Override default action for keys that are used
if (config.capturedKeyNumbers.indexOf(keynumber) < 0)
return;
if (!fullscreenActive && (keynumber == 16 || keynumber == 17) && config.mouseZoom == 'ctrl')
// Disable ctrl / shift zoom when holding the ctrl key is required for
// scroll wheel zooming
return;
event.preventDefault();
// If escape key is pressed


Зареждане…
Отказ
Запис