X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=stemmaweb%2Froot%2Fjs%2Fcomponentload.js;h=87cc0ef0aaa402e08119f86152376426b2432f70;hb=91b888edba6393eb1dfc0e18c37f2b824724e5b4;hp=01663da7497c1d22b9103a47f395a1c350d67dcf;hpb=ba99519aa11f30b5acfe7e1a6c0d18d8fdb14bce;p=scpubgit%2Fstemmatology.git diff --git a/stemmaweb/root/js/componentload.js b/stemmaweb/root/js/componentload.js index 01663da..87cc0ef 100644 --- a/stemmaweb/root/js/componentload.js +++ b/stemmaweb/root/js/componentload.js @@ -6,26 +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 , function() { - if( $('#stemma_graph svg').size() != 0 ) { - var stemma_svg_element = $('#stemma_graph svg').svg().svg('get').root(); - stemma_svg_element.height.baseVal.value = $('#stemma_graph').height(); - } - }); - $('#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); - }); + $('#stemma_graph').load( basepath + "/stemma/" + textid ); // Then populate the various elements with the right text name/ID. // Stemma and variant graph titles