The URI of TUHH Docker Registry changed from "docker.rz.tu-harburg.de:5000" to "docker.rz.tu-harburg.de". Please update your gitlab-ci.yml files if you use images from this registry.

Commit de73e9a1 authored by Tobias Zeumer's avatar Tobias Zeumer

Switch to php and remove snapsvg; #4

parent 2192c02b
......@@ -11,9 +11,7 @@
<link href="css/svgWebStyle.css" rel="stylesheet" />
<script type="text/javascript" src="node_modules/jquery/dist/jquery.min.js" defer></script>
<script type="text/javascript" src="node_modules/jquery-lang-js/js/jquery-lang.js" defer></script>
<script type="text/javascript" src="node_modules/snapsvg/dist/snap.svg-min.js" defer></script>
<script type="text/javascript" src="node_modules/jquery-lang-js/js/jquery-lang.js" defer></script>
<script type="text/javascript" src="node_modules/jquery.panzoom/dist/jquery.panzoom.min.js" defer></script>
<script type="text/javascript" src="node_modules/jquery.mousewheel/jquery.mousewheel.js" defer></script>
......@@ -358,7 +356,9 @@
<div id="container-content">
<div id="map_container">
<div id="zoom_parent">
<div id="map" class="panzoom"></div>
<div id="map" class="panzoom">
<?php echo file_get_contents('res/tub_floorplan.min.svg'); ?>
</div>
</div>
<div id="widgets">
......
......@@ -40,27 +40,9 @@ if (location.search) {
$( document ).ready(function() {
/* #########################################################################
# Load and append SVG file
######################################################################### */
var s = Snap("#map");
//Have Snap load the SVG file; use optimized and minimized file for web
//Snap.load('res/tub_floorplan.svg', onSVGLoaded );
Snap.load('res/tub_floorplan.min.svg', onSVGLoaded );
function onSVGLoaded( svg ) {
s.append( svg );
setTimeout(function(){
// Interesting theory (?), why "0" - obviously - still makes a difference https://stackoverflow.com/a/41893544
console.log('Short delay to recalculate dimensions AFTER appending svg content (https://collaborating.tuhh.de/tobias.zeumer/tub-floorplan/issues/25)');
onSVGappended();
}, 0);
}
/* #########################################################################
# Everything that relies on the svg being loaded
######################################################################### */
function onSVGappended(){
// Remove any inline styles (since Inkscape just keeps adding them; https://bugs.launchpad.net/inkscape/+bug/167937)
// Get default styles from webStyles.css
$('.mainlayer').find('*').removeAttr('style');
......@@ -383,7 +365,6 @@ $( document ).ready(function() {
// SVG READY END
}
/* #########################################################################
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment