added recoil inner and outter radius
This commit is contained in:
parent
c59a49cd13
commit
4bc68108d5
|
@ -203,6 +203,15 @@
|
|||
</tr>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td style="text-align:right" > Recoil radius, inner [mm]:</td>
|
||||
<td><Input type="text" style="width:40px" value="10" id='innerRecoil' enterkeyhint="done"/></td>
|
||||
<td style="text-align:right" > outter [mm]:</td>
|
||||
<td><Input type="text" style="width:40px" value="45" id='outterRecoil' enterkeyhint="done"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p></p>
|
||||
|
||||
|
||||
|
|
|
@ -767,17 +767,20 @@ document.getElementById('posArrayRange').oninput = function(){
|
|||
function AdjustRecoilPos(){
|
||||
let pos1 = parseInt(document.getElementById('posRecoil').value);
|
||||
let pos2 = pos1+10;
|
||||
|
||||
|
||||
let radius1 = parseInt(document.getElementById('innerRecoil').value);
|
||||
let radius2 = parseInt(document.getElementById('outterRecoil').value);
|
||||
|
||||
//document.getElementById('n0').innerHTML = pos1;
|
||||
|
||||
|
||||
let shapeRecoil = {
|
||||
type: 'rect',
|
||||
xref: 'x',
|
||||
yref: 'y',
|
||||
x0 : pos1,
|
||||
x1 : pos2,
|
||||
y0 : 10,
|
||||
y1 : 45,
|
||||
y0 : radius1,
|
||||
y1 : radius2,
|
||||
fillcolor : '#FF0000',
|
||||
opacity : 0.4,
|
||||
line : { width : 0}
|
||||
|
@ -821,6 +824,22 @@ document.getElementById('posRecoilRange').oninput = function(){
|
|||
AdjustRecoilPos();
|
||||
}
|
||||
|
||||
document.getElementById('innerRecoil').addEventListener('keypress',
|
||||
function(e){
|
||||
if(e.keyCode == 13){
|
||||
AdjustRecoilPos();
|
||||
}
|
||||
}, false
|
||||
);
|
||||
|
||||
document.getElementById('outterRecoil').addEventListener('keypress',
|
||||
function(e){
|
||||
if(e.keyCode == 13){
|
||||
AdjustRecoilPos();
|
||||
}
|
||||
}, false
|
||||
);
|
||||
|
||||
function AdjustRangeRZ(){
|
||||
|
||||
let zmin = parseInt(document.getElementById('zRange1').value);
|
||||
|
|
Loading…
Reference in New Issue
Block a user