瀏覽代碼

Merge 52a83e8d6b into 2f64204a16

pull/555/merge
Daniel Morgenstern 6 年之前
committed by GitHub
父節點
當前提交
e3cbb0c82d
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: 4AEE18F83AFDEB23
共有 2 個文件被更改,包括 6 次插入4 次删除
  1. +3
    -0
      .gitignore
  2. +3
    -4
      src/js/pannellum.js

+ 3
- 0
.gitignore 查看文件

@@ -6,3 +6,6 @@ build/**

# Ignore generated docs
utils/doc/generated_docs

# Ignore IntelliJ Files
.idea

+ 3
- 4
src/js/pannellum.js 查看文件

@@ -103,6 +103,7 @@ var defaultConfig = {
draggable: true,
disableKeyboardCtrl: false,
crossOrigin: 'anonymous',
usedKeyNumbers: [16, 17, 27, 37, 38, 39, 40, 61, 65, 68, 83, 87, 107, 109, 173, 187, 189],
};

// Translatable / configurable strings
@@ -129,8 +130,6 @@ defaultConfig.strings = {
unknownError: 'Unknown error. Check developer console.',
}

var usedKeyNumbers = [16, 17, 27, 37, 38, 39, 40, 61, 65, 68, 83, 87, 107, 109, 173, 187, 189];

// Initialize container
container = typeof container === 'string' ? document.getElementById(container) : container;
container.classList.add('pnlm-container');
@@ -1009,7 +1008,7 @@ function onDocumentKeyPress(event) {
var keynumber = event.which || event.keycode;

// Override default action for keys that are used
if (usedKeyNumbers.indexOf(keynumber) < 0)
if (config.usedKeyNumbers.indexOf(keynumber) < 0)
return
event.preventDefault();
@@ -1045,7 +1044,7 @@ function onDocumentKeyUp(event) {
var keynumber = event.which || event.keycode;
// Override default action for keys that are used
if (usedKeyNumbers.indexOf(keynumber) < 0)
if (config.usedKeyNumbers.indexOf(keynumber) < 0)
return
event.preventDefault();


Loading…
取消
儲存