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

Merge branch 'master' into cirspecte-adoptions

pull/880/head
Nico Höllerich преди 4 години
родител
ревизия
175d1d9130
променени са 3 файла, в които са добавени 15 реда и са изтрити 4 реда
  1. +2
    -1
      doc/json-config-parameters.md
  2. +11
    -1
      src/js/pannellum.js
  3. +2
    -2
      utils/multires/generate.py

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

@@ -362,7 +362,8 @@ by constraining the yaw and the field-of-view. Even at the corners and edges
of the canvas only areas actually belonging to the image
(i.e., within [`minYaw`, `maxYaw`] and [`minPitch`, `maxPitch`]) are shown,
thus setting the `backgroundColor` option is not needed if this option is set.
Defaults to `false`.
Defaults to `false`. The `minPitch` and `maxPitch` parameters must be defined
if this option is enabled.


## `equirectangular` specific options


+ 11
- 1
src/js/pannellum.js Целия файл

@@ -1845,6 +1845,16 @@ function createHotSpot(hs) {
div.addEventListener('click', function(e) {
hs.clickHandlerFunc(e, hs.clickHandlerArgs);
}, 'false');
if (document.documentElement.style.pointerAction === '' &&
document.documentElement.style.touchAction === '') {
div.addEventListener('pointerup', function(e) {
hs.clickHandlerFunc(e, hs.clickHandlerArgs);
}, false);
} else {
div.addEventListener('touchend', function(e) {
hs.clickHandlerFunc(e, hs.clickHandlerArgs);
}, false);
}
div.className += ' pnlm-pointer';
span.className += ' pnlm-pointer';
}
@@ -2306,7 +2316,7 @@ function constrainHfov(hfov) {
newHfov = hfov;
}
// Optionally avoid showing background (empty space) on top or bottom by adapting newHfov
if (config.avoidShowingBackground && renderer) {
if (config.avoidShowingBackground && renderer && !isNaN(config.maxPitch - config.minPitch)) {
var canvas = renderer.getCanvas();
newHfov = Math.min(newHfov,
Math.atan(Math.tan((config.maxPitch - config.minPitch) / 360 * Math.PI) /


+ 2
- 2
utils/multires/generate.py Целия файл

@@ -5,7 +5,7 @@

# generate.py - A multires tile set generator for Pannellum
# Extensions to cylindrical input and partial panoramas by David von Oheimb
# Copyright (c) 2014-2018 Matthew Petroff
# Copyright (c) 2014-2020 Matthew Petroff
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -246,7 +246,7 @@ if vaov < 180:
text.append(' "maxPitch": ' + str(+vaov/2+args.vOffset)+ ',')
if colorTuple != (0, 0, 0):
text.append(' "backgroundColor": "' + args.backgroundColor+ '",')
if args.avoidbackground:
if args.avoidbackground and (haov < 360 or vaov < 180):
text.append(' "avoidShowingBackground": true,')
if args.autoload:
text.append(' "autoLoad": true,')


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