使用SVG API时,我可以创建一条从点<div class="row">
<div class="column" style="padding: 7.5%" >
<form #institutesForm="ngForm" (ngSubmit)="instituteLogins(institutesForm)">
<div class="form-group">
<label> <strong>Date</strong> </label>
<input type="date" name="date" id="date" class="form-control" [(ngModel)]="institutes.date">
<br>
<h2> <strong> Patient Problems</strong></h2>
<label><strong> Symtoms</strong> </label>
<input type="text" name="symtoms" id="symtoms" class="form-control"[(ngModel)]="institutes.symtoms">
<label><strong>Allergy</strong> </label>
<input type="text" name="allergy" id="allergy" class="form-control"[(ngModel)]="institutes.allergy">
<br>
<h2><strong>Diagnosis</strong></h2>
<label> <strong>Condition</strong> </label>
<input type="text" name="condition" id="condition" class="form-control"[(ngModel)]="institutes.condition">
<label><strong> Advice </strong></label>
<input type="text" name="advice" id="advice" class="form-control"[(ngModel)]="institutes.advice">
<br>
<h2> <strong>Prescription</strong> </h2>
<br>
<label><strong> Medication </strong></label>
<input type="text" name="medication" id="medication" class="form-control"[(ngModel)]="institutes.medication">
<label><strong>Course</strong></label>
<input type="text" id="course" name="course" class="form-control"[(ngModel)]="institutes.course">
<br><br>
</div>
<button id="record" class="btn btn-primary" type="submit" >Add Record</button> </form>
</div>
</div>
到(x1,y1)
的线。我之所以这样做,是因为(x2,y2)
对应于我有对象(x1,y1)
的地方,而A
对应于有对象(x2,y2)
的地方。
在动画制作过程中,我可能随后将对象B
移动到另一个位置。问题在于,A
和A
之间绘制的线不会自动更新。
我想知道是否可以通过SVG,JS或某些现有的库来表达给定的行应连接对象B
和A
,以及是否移动它们,该行将自动更新。
这实际上并不仅限于动画-我可能想将一堆对象放在一组位置上,说起来我想将B
连接到A
比说起来容易必须重复周围的坐标。
当然,这里的例子只是一个例子,我希望能够在其他各种情况下做到这一点。
谢谢