From: Tara L Andrews Date: Wed, 27 Jun 2012 01:53:53 +0000 (+0200) Subject: remove variant graph from front page, fix stemma scaling X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f79dd72c83682e51deb1fd9494d0ed066ecfc3f3;p=scpubgit%2Fstemmaweb.git remove variant graph from front page, fix stemma scaling --- diff --git a/lib/stemmaweb/Controller/Root.pm b/lib/stemmaweb/Controller/Root.pm index 6610705..3b6ba88 100644 --- a/lib/stemmaweb/Controller/Root.pm +++ b/lib/stemmaweb/Controller/Root.pm @@ -125,7 +125,7 @@ sub stemma :Local :Args(1) { } $c->stash->{'result'} = $tradition->stemma_count - ? $tradition->stemma(0)->as_svg + ? $tradition->stemma(0)->as_svg( { size => [ 500, 375 ] } ) : ''; $c->forward('View::SVG'); } diff --git a/root/css/style.css b/root/css/style.css index 264e6de..a3047f9 100644 --- a/root/css/style.css +++ b/root/css/style.css @@ -121,10 +121,9 @@ div.button:hover span { } #stexaminer_button { bottom: 0; - margin-top: 5px; + margin-top: 13px; } #relater_button { float: left; - margin-left: 83px; - margin-top: 7px; + margin-left: 100px; } diff --git a/root/js/componentload.js b/root/js/componentload.js index e881f84..87cc0ef 100644 --- a/root/js/componentload.js +++ b/root/js/componentload.js @@ -6,21 +6,11 @@ function loadTradition( textid, textname ) { }; var imghtml = 'Loading SVG...' $('#stemma_graph').empty(); - $('#variant_graph').empty(); $('#stemma_graph').append( imghtml ); - $('#variant_graph').append( imghtml ); // Then get and load the actual content. // TODO: scale #stemma_grpah both horizontally and vertically // TODO: load svgs from SVG.Jquery (to make scaling react in Safari) $('#stemma_graph').load( basepath + "/stemma/" + textid ); - $('#variant_graph').load( basepath + "/variantgraph/" + textid , function() { - var variant_svg_element = $('#variant_graph svg').svg().svg('get').root(); - var svg_height = variant_svg_element.height.baseVal.value; - var svg_width = variant_svg_element.width.baseVal.value; - var container_height = $('#variant_graph').height(); - variant_svg_element.height.baseVal.value = container_height; - variant_svg_element.width.baseVal.value = (svg_width/svg_height * container_height); - }); // Then populate the various elements with the right text name/ID. // Stemma and variant graph titles diff --git a/root/src/index.tt b/root/src/index.tt index afde0cd..61fe470 100644 --- a/root/src/index.tt +++ b/root/src/index.tt @@ -31,15 +31,13 @@ $(document).ready(function() { Examine variants against this stemma - -
-

Variant graph for selected text

Run relationship mapper
-
+
+
[% PROCESS footer.tt %] \ No newline at end of file