M
M
MrFlatman2018-05-09 23:34:12
JavaScript
MrFlatman, 2018-05-09 23:34:12

Moving a canvas shape in JS?

The task is to make it possible to move the triangle according to the Drag and Drop principle, initially this code was written for a square and everything worked, but then the task changed and it became necessary to draw a triangle, then I could draw it, but I can’t organize its movement, tell me, please, how can I do this?
The code is quite voluminous, so a link to an external JSFiddle
PS just in case tops: top: [50,0]; left:[0.75]; right:[100,75]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2018-05-10
@MrFlatman

keep

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question