Improve navbar

Signed-off-by: Rémi BERTHO <remi.bertho@dalan.fr>
This commit is contained in:
Rémi BERTHO 2018-05-01 11:15:07 +02:00
parent 7c604fab52
commit 50030cabc1
Signed by: dalan
GPG key ID: EE3B917931C07B64
3 changed files with 12 additions and 4 deletions

View file

@ -1,6 +1,6 @@
MIT License
Copyright (c) <year> <copyright holders>
Copyright (c) 2018 Rémi BERTHO
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

View file

@ -49,7 +49,12 @@
var PSV = new PhotoSphereViewer({
container: 'photosphere',
panorama: '__IMG_PATH__',
time_anim: false
time_anim: false,
navbar: [
'autorotate',
'zoom',
'caption'
]
});
</script>

View file

@ -12,18 +12,21 @@ from PyQt5.QtWebEngineWidgets import *
path = os.path.dirname(os.path.realpath(sys.argv[0]))
os.chdir(path)
img = sys.argv[1]
try:
with open("html/index.html", "r", encoding="utf8") as file:
html = file.read()
except OSError as exception:
print("Error: HTML file not found: " + str(exception))
html = html.replace("__IMG_PATH__", sys.argv[1])
html = html.replace("__IMG_PATH__", img)
app = QApplication(sys.argv)
app.setApplicationName("SimplePanoramaViewer")
web = QWebEngineView()
web.setHtml(html,QUrl("file://" + path + "/index.html"))
web.setWindowTitle("SimplePanoramaViewer")
web.setWindowTitle(img)
web.show()
sys.exit(app.exec_())