Drawing arrows on an HTML page to visualize semantic links between textual spans

前端 未结 10 1541
轮回少年
轮回少年 2020-11-30 18:56

I have an HTML page with some textual spans marked up something like this:

...
p50
...


        
10条回答
  •  独厮守ぢ
    2020-11-30 19:28

    A great library for arrows is JointJS that is based on Raphael as shown above. With JointJS you can easily draw arrows with curves or vertices without any complicated stuff ;-)

    var j34 = s3.joint(s4, uml.arrow).setVertices(["170 130", "250 120"]);
    

    This defines an arrow 'j34' that connects two js items s3 with s4. Everything else can be read in the documentation of JointJS.

提交回复
热议问题