Skip to content

Modify existing points/create point on mouse click #224

Description

@amarshall8

Hi! I'm trying to use pts to create a seemingly relatively simple project. Essentially, I want to create a rectangle where all four corners can be dragged to any position and then left there. Eventually I want to add grid lines that appear at regularly spaced intervals between the outermost lines on the opposite edges, but that's a future problem.

Essentially, how can I modify existing points on the canvas by clicking and dragging them to new spots? All the library demos show is mouse tracking. I'm quite new to JS so I'm a bit lost.

As a an even more future goal I'd also love to add a feature where the corner nodes of the 4-sided polygon will light up when you're near to them.

Best,
Alec

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions