如何使用一个角度点改变曲线到直线两点之间的直线

时间:2015-07-23 12:20:19

标签: javascript jquery canvas svg

我需要什么

what i need

当前示例:http://jsfiddle.net/2ecsjomz/5/

注意:

  • 特定的左/右对永远不会改变位置,# app\views\devise\mailer\reset_password_instructions.html.erb <p>Hello <%= @resource.email %>!</p> <p>Someone has requested a link to change your password. You can do this through the link below.</p> <p><%= link_to 'Change my password', spree.edit_password_url(@resource, reset_password_token: @token) %></p> <p>If you didn't request this, please ignore this email.</p> <p>Your password won't change until you access the link above and create a new one.</p> 将始终留在左侧或model.DisplayAlerts = addAlert;
  • 需要在两点之间形成单个角度
  • 该行从&#34;左拖动&#34;需要横向
  • 如果它有助于我不需要点可拖动,那么它可以有特定的坐标。
  • 它需要在两个html元素之间生成行(与示例相同)

1 个答案:

答案 0 :(得分:4)

将路径编码更改为以下内容:

        // Build the path decription
        p = "M" + pt1x + "," + pt1y +
            " L" + (pt1x+pt2x)/2 + "," + pt1y +
            " L" + pt2x + "," + pt2y ;