瀏覽代碼

Allow adding additional css files to the embedded html

Useful for using, (for example) fontawesome icons for hotspots
pull/12/head
Guillaume de Bure 10 年之前
父節點
當前提交
ad5b4ff7b5
共有 3 個檔案被更改,包括 17 行新增4 行删除
  1. +1
    -0
      examples/example-video.htm
  2. +13
    -4
      examples/example-video.json
  3. +3
    -0
      src/js/pannellum.js

+ 1
- 0
examples/example-video.htm 查看文件

@@ -3,6 +3,7 @@
<head>
<title>pannellum embed example</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<iframe title="pannellum panorama viewer" width="480" height="390" webkitAllowFullScreen mozallowfullscreen allowFullScreen style="border-style:none;" src="../src/pannellum.htm?tour=../examples/example-video.json"></iframe>


+ 13
- 4
examples/example-video.json 查看文件

@@ -2,7 +2,8 @@
"default": {
"author": "Matthew Petroff",
"firstScene": "pond",
"autoload": "yes"
"autoload": "yes",
"css": "/font-awesome/css/font-awesome.min.css"
},
"scenes": {
@@ -56,11 +57,19 @@
},
{
"pitch":0,
"yaw": -120,
"text": "Video Test ",
"type": "info",
"yaw": 0,
"text": "Video Test",
"type": "fa fa-camera",
"video": "../examples/big_buck_bunny_480p_h264.mov",
"width":200
},
{
"pitch":0,
"yaw": 30,
"text": "Image Test",
"type": "fa fa-photo",
"image": "http://upload.wikimedia.org/wikipedia/commons/thumb/c/ca/Jordan_Pond_Maine.JPG/1024px-Jordan_Pond_Maine.JPG",
"width":200
}
]
}


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

@@ -667,6 +667,9 @@ function processOptions() {
document.getElementById('author_box').innerHTML = 'by ' + config[key];
document.getElementById('panorama_info').style.display = 'inline';
break;
case 'css':
document.head.innerHTML = document.head.innerHTML + '<link type="text/css" rel="Stylesheet" href="' + config[key] + '" />'
case 'popout':
if(config[key] == 'yes') {


Loading…
取消
儲存