瀏覽代碼

Rename to `touchPanSpeedCoeffFactor`

pull/556/head
Matthew Petroff 6 年之前
committed by GitHub
父節點
當前提交
054fc385fa
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 1 個檔案被更改,包括 2 行新增2 行删除
  1. +2
    -2
      src/js/pannellum.js

+ 2
- 2
src/js/pannellum.js 查看文件

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

@@ -875,7 +875,7 @@ function onDocumentTouchMove(event) {
//
// Currently this seems to *roughly* keep initial drag/pan start position close to
// the user's finger while panning regardless of zoom level / config.hfov value.
var touchmovePanSpeedCoeff = (config.hfov / 360) * config.touchmovePanSpeedCoeffFactor;
var touchmovePanSpeedCoeff = (config.hfov / 360) * config.touchPanSpeedCoeffFactor;

var yaw = (onPointerDownPointerX - clientX) * touchmovePanSpeedCoeff + onPointerDownYaw;
speed.yaw = (yaw - config.yaw) % 360 * 0.2;


Loading…
取消
儲存