diff --git a/src/standalone/standalone.css b/src/standalone/standalone.css index 431bb4d..4c1bd8d 100644 --- a/src/standalone/standalone.css +++ b/src/standalone/standalone.css @@ -1,8 +1,8 @@ -html{ +html { height: 100%; } -body{ +body { margin: 0; padding: 0; overflow: hidden; @@ -10,4 +10,4 @@ body{ cursor: default; width: 100%; height: 100%; -} \ No newline at end of file +} diff --git a/utils/build/build.py b/utils/build/build.py index c6b4271..d858ba1 100755 --- a/utils/build/build.py +++ b/utils/build/build.py @@ -10,12 +10,10 @@ JS = [ 'js/libpannellum.js', 'js/RequestAnimationFrame.js', 'js/pannellum.js', -'standalone/standalone.js' ] CSS = [ 'css/pannellum.css', -'standalone/standalone.css' ] HTML = [ @@ -103,6 +101,9 @@ def build(files, css, html, filename, release=False): js = js.replace('"_blank">Pannellum','"_blank">Pannellum ' + read('../VERSION')) else: js = js.replace('"_blank">Pannellum','"_blank">Pannellum ' + subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']).decode('utf-8').strip()) + with open('../../src/standalone/standalone.js', 'r') as f: + standalone_js = f.read() + standalone_js = JScompress(js + standalone_js) js = JScompress(js) print('=' * 40) @@ -112,6 +113,12 @@ def build(files, css, html, filename, release=False): css = merge(css) css = css.replace("'img/grab.svg'","'data:image/svg+xml," + urllib.parse.quote(read('css/img/grab.svg'),'') + "'") css = css.replace("'img/grabbing.svg'","'data:image/svg+xml," + urllib.parse.quote(read('css/img/grabbing.svg'),'') + "'") + with open('../../src/standalone/standalone.css', 'r') as f: + standalone_css = f.read() + standalone_css = cssCompress(css + standalone_css) + standalone_css = standalone_css.replace("'img/sprites.svg'","'data:image/svg+xml," + urllib.parse.quote(read('css/img/sprites.svg'),'') + "'") + standalone_css = standalone_css.replace("'img/background.svg'","'data:image/svg+xml," + urllib.parse.quote(read('css/img/background.svg'),'') + "'") + standalone_css = standalone_css.replace("'img/compass.svg'","'data:image/svg+xml," + urllib.parse.quote(read('css/img/compass.svg'),'') + "'") css = cssCompress(css) css = css.replace("'img/sprites.svg'","'data:image/svg+xml," + urllib.parse.quote(read('css/img/sprites.svg'),'') + "'") css = css.replace("'img/background.svg'","'data:image/svg+xml," + urllib.parse.quote(read('css/img/background.svg'),'') + "'") @@ -122,11 +129,12 @@ def build(files, css, html, filename, release=False): print('=' * 40) html = merge(html) - html = html.replace('','') + html = html.replace('','') html = html.replace('','') html = html.replace('','') - html = html.replace('','') + html = html.replace('','') html = html.replace('','') + html = html.replace('', '') html = htmlCompress(html) output(addHeaderHTML(html), folder + htmlfilename)