Unified naming patterns
This commit is contained in:
@@ -40,10 +40,9 @@ fetch(url)
|
|||||||
.padAngle(2 / 300)
|
.padAngle(2 / 300)
|
||||||
.cornerRadius(8);
|
.cornerRadius(8);
|
||||||
|
|
||||||
const js = d3.select("#js");
|
const canvas = d3.select("#canvas");
|
||||||
js.select(".loading").remove();
|
|
||||||
|
|
||||||
const svg = js
|
const svg = canvas
|
||||||
.append("svg")
|
.append("svg")
|
||||||
.attr("viewBox", "-320 -320 640 640")
|
.attr("viewBox", "-320 -320 640 640")
|
||||||
.attr("width", 400)
|
.attr("width", 400)
|
||||||
|
|||||||
@@ -40,11 +40,10 @@ arc = (
|
|||||||
.cornerRadius(8)
|
.cornerRadius(8)
|
||||||
)
|
)
|
||||||
|
|
||||||
py = d3.select("#py")
|
canvas = d3.select("#canvas")
|
||||||
py.select(".loading").remove()
|
|
||||||
|
|
||||||
svg = (
|
svg = (
|
||||||
py.append("svg")
|
canvas.append("svg")
|
||||||
.attr("viewBox", "-320 -320 640 640")
|
.attr("viewBox", "-320 -320 640 640")
|
||||||
.attr("width", 400)
|
.attr("width", 400)
|
||||||
.attr("height", 400)
|
.attr("height", 400)
|
||||||
|
|||||||
@@ -13,9 +13,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<h1>Duolingo XP nach Sprache</h1>
|
<h1>Duolingo XP nach Sprache</h1>
|
||||||
<h2>JavaScript</h2>
|
<h2>JavaScript</h2>
|
||||||
<div id="js" style="width: 400px; height: 400px; margin: auto">
|
<div id="canvas" style="width: 400px; height: 400px; margin: auto"></div>
|
||||||
<div class="loading"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="importmap">
|
<script type="importmap">
|
||||||
|
|||||||
@@ -16,9 +16,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<h1>Duolingo XP nach Sprache</h1>
|
<h1>Duolingo XP nach Sprache</h1>
|
||||||
<h2>PyScript</h2>
|
<h2>PyScript</h2>
|
||||||
<div id="py" style="width: 400px; height: 400px; margin: auto">
|
<div id="canvas" style="width: 400px; height: 400px; margin: auto"></div>
|
||||||
<div class="loading"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="importmap">
|
<script type="importmap">
|
||||||
|
|||||||
Reference in New Issue
Block a user