将一条线绑定到其他两个SVG对象的位置。有没有一种方法可以通过SVG,Javascript或任何其他库轻松地表达这一点?

使用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移动到另一个位置。问题在于,AA之间绘制的线不会自动更新。

我想知道是否可以通过SVG,JS或某些现有的库来表达给定的行应连接对象BA,以及是否移动它们,该行将自动更新。

这实际上并不仅限于动画-我可能想将一堆对象放在一组位置上,说起来我想将B连接到A比说起来容易必须重复周围的坐标。

当然,这里的例子只是一个例子,我希望能够在其他各种情况下做到这一点。

谢谢

sv37vs 回答:将一条线绑定到其他两个SVG对象的位置。有没有一种方法可以通过SVG,Javascript或任何其他库轻松地表达这一点?

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3086473.html

大家都在问