响应SVG和JavaScript的问题

响应SVG和JavaScript的问题,javascript,html,svg,Javascript,Html,Svg,我仍然对SVG问题感兴趣。自从上次以来,我已经向前迈出了很多步,现在,我面临着一个新的问题 以下是我到目前为止的代码:(在全屏模式下使用) d3.选择(“#步骤”)。打开('click',function(){ sections=document.getElementById(“sections”).value; 重离子交换(部分); }); //附加输入设备 功能表(节){ 变量形式=d3。选择(“形式2”) html(“”); 格式。附加(“hr”); form.append('p').h

我仍然对SVG问题感兴趣。自从上次以来,我已经向前迈出了很多步,现在,我面临着一个新的问题

以下是我到目前为止的代码:(在全屏模式下使用)

d3.选择(“#步骤”)。打开('click',function(){
sections=document.getElementById(“sections”).value;
重离子交换(部分);
});
//附加输入设备
功能表(节){
变量形式=d3。选择(“形式2”)
html(“”);
格式。附加(“hr”);
form.append('p').html('Nom des sections').style('text-decoration','underline');
对于(i=1;i{
//插入苏节供应
const subSecGroup=subSections.append('div').attr('class','sous section');
subSecGroup.append('label').html(“Nom de la sous section”+ind++);
subSecGroup.append('input').attr('type','text'))
subSecGroup.append('button').attr('type','button'))
//一段时间内发生的事件
.text('supplimer')。在('click',()=>{
subSecGroup.remove();
//-1.在本节所述名称的附加条款中,应避免出现新的问题
ind--;
})
});
const subSections=secGroup.append('div');
const subSecGroup=subSections.append('div').attr('class','sous section');
subSecGroup.append('label').html(“第1节的名称”);
subSecGroup.append('input').attr('type','text');
}
//我遇到了首映式的投入,这是一场无法避免的冲突
//d3.选择(“#圆”).attr('disabled','');
//d3.选择(“#节”).attr('disabled','');
//d3.选择(“#步骤”).attr('disabled','');
//d3.select('select')。attr('disabled','')
append('按钮')
.attr(“id”、“创建”)
.html(“Créer”)
。打开(“单击”,创建);
append('按钮')
.attr(“id”、“重置”)
.html(“重置”)
。打开('单击',重新加载页面);
}
//再充电功能页面倒灌重置
函数重载页面(){
window.location.reload();
}
//这是一个值得纪念的节日
函数createSvg(圆){
const svg=d3.select(“#canvas”);
const width=parseInt(svg.attr('width'));
const height=parseInt(svg.attr('height'));
svg.selectAll('g').remove();
常量g=svg.append('g')
.attr('transform','translate(${width/2},${height/2})`);
const tailechoisie=parseInt(d3.select('select').node().value);
const epaisseur=25*tailleChoisie;//为输入的taille choisie选择功能更改
const-empositionhauteur=(tailechoisie*11)+11;//Valeur qui permet de center les textes peu importe la tailechoisie
常数整圈=2*3.14;
const subSectionInputs=document.querySelectorAll(“.sous节输入”);
const taillePetiteSection=整圈/子段输入。长度;
const sections=document.querySelectorAll('.section');
//第三方会议(大区唯一会议)
让prevAngle=0;
对于(设j=0;j“节”+圆+j)
.attr('笔划','黑色')
.attr('fill',colorArray[j])
.attr('class','grande-section-'+j)
.在(‘点击’、本地化)上;
//阿约特·杜特斯特
g、 附加(“文本”)
.attr(“类”、“月文本”)
.attr(“dy”,22)
.append(“textPath”)
.attr(“startOffset”,“22%”)
.style(“文本锚定”、“中间”)
.attr(“xlink:href”,()=>“#section”+圆圈+j)
.text(()=>text);
prevAngle=endAngle;
}
//“国际性”政党(大区)
for(设i=0;i<圆;i++){
for(设j=0;j“节”+i+j)
.attr('笔划','黑色')
.attr('填充',颜色)
.on('点击',本地化)
;
//你的短信是什么
如果(文本){
parent.append(“文本”)
.attr(“类”、“月文本”)
.attr(“dy”,安置点)
.style(“文本锚定”、“中间”)
.append(“textPath”)
.attr(“startOffset”,“22%”)
.attr(“xlink:href”,()=>“#节”+i+j)
.text(()=>text);
}
}
//TouLououde CouLouur-TopeDethe背景Dead Dead Paulfout,A.E.VeVE Le Posiple D'Pin输入
var colorArray=['#FF6633'、'#FFB399'、'#FF33FF'、'#FFFF99'、'#00B3E6',
"E6B333","3366E6","99"