KSP template fixes
This commit is contained in:
parent
8d3347aa3b
commit
5298dae17f
4 changed files with 6 additions and 10 deletions
|
@ -31,7 +31,6 @@
|
|||
</style>
|
||||
|
||||
<main>
|
||||
<h1>Cool graf</h1>
|
||||
<!--
|
||||
<svg height=200 width=200>
|
||||
<GraphNode task="null" />
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
}) // This provide the id of a node
|
||||
.links(edges) // and this the list of links
|
||||
)
|
||||
.force("charge", d3.forceManyBody().strength(-500)) // This adds repulsion between nodes. Play with the -400 for the repulsion strength
|
||||
.force("charge", d3.forceManyBody().strength(-400)) // This adds repulsion between nodes. Play with the -400 for the repulsion strength
|
||||
.force("x", d3.forceX()) // attracts elements to the zero X coord
|
||||
.force("y", d3.forceY()) // attracts elements to the zero Y coord
|
||||
.on("tick", ticked)
|
||||
|
@ -57,7 +57,7 @@
|
|||
|
||||
<style>
|
||||
div {
|
||||
height: 75vh;
|
||||
height: 100vh;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
</script>
|
||||
|
||||
<style>
|
||||
:global(g):hover > ellipse {
|
||||
g:hover > ellipse {
|
||||
fill: #ffb3a2
|
||||
}
|
||||
ellipse {
|
||||
|
@ -37,11 +37,7 @@
|
|||
</style>
|
||||
|
||||
<g on:mouseenter={enter} on:mouseleave={leave}>
|
||||
{#if !hovering}
|
||||
<ellipse rx={ellipse_rx} ry={ellipse_ry} {cx} {cy} />
|
||||
{:else}
|
||||
<ellipse rx={ellipse_rx} ry={ellipse_ry} {cx} {cy} />
|
||||
{/if}
|
||||
<ellipse rx={ellipse_rx} ry={ellipse_ry} {cx} {cy} />
|
||||
<text
|
||||
bind:this={text_element}
|
||||
x={cx}
|
||||
|
|
|
@ -55,7 +55,8 @@ namespace Ksp.WebServer.Controllers
|
|||
var innerBody = grafik.Body;
|
||||
innerBody.Replace(kspTemplate.Body);
|
||||
var page = grafik.Body.QuerySelector("#page");
|
||||
page.Replace(innerBody.ChildNodes.ToArray());
|
||||
page.InnerHtml = "";
|
||||
page.AppendNodes(innerBody.ChildNodes.ToArray());
|
||||
|
||||
foreach(var headElement in kspTemplate.Head.QuerySelectorAll("link, script"))
|
||||
{
|
||||
|
|
Reference in a new issue