open-craft / xblock-vectordraw

An XBlock for creating vector drawing exercises
GNU Affero General Public License v3.0
2 stars 3 forks source link

Clicking on board does not draw vector, must click button #5

Closed ChristopherChudzicki closed 8 years ago

ChristopherChudzicki commented 8 years ago

Currently, in order to position a vector on board the user must:

  1. Click [Add Vector] button
  2. Drag tip and tail of vector to desired points.

In the JSinput version of VectorDraw, the user was able to simultaneously add and position a vector by clicking on the board and dragging mouse to place the vector tip. This method felt much more natural, much more like drawing.

This feature should be added to the X-Block version.

ChristopherChudzicki commented 8 years ago

@bradenmacdonald @dseaton @antoviaque This bug only seems to happen if the board is empty.

In other words, if there is a vector pre-drawn on the board, or you have already added a vector using "add vector" button, then click to draw functions as expected.

This bug also seems to be present in recent (but not old) versions of JS-Input vector draw. [It is not visible in the demo problems in Notes_and_examples because all those problems <script type="text/javascript" src="/c4x/DavidsonNext/Ann101/asset/vectordraw.js"></script>, which is presumably an older version of vector draw.)

See https://studio.edge.edx.org/container/block-v1:CAC+CAC103+FOREVER+type@vertical+block@8c12b4a89da645728dcb7d04b291b3e9

ChristopherChudzicki commented 8 years ago

@antoviaque @bradenmacdonald @dseaton Found the bug and fixed it in the JS-Input version (which I'm currently working with). See pull request. I'm not going to touch the X-Block, though, since I don't know how to test changes.

bradenmacdonald commented 8 years ago

Thanks for finding that fix, @ChristopherChudzicki :) We will likely be starting our work on this next week.

ChristopherChudzicki commented 8 years ago

@bradenmacdonald I realized today that @smarnach found it a long time ago, but it never got pulled :( . https://github.com/open-craft/jsinput-vectordraw/pull/24

bradenmacdonald commented 8 years ago

@ChristopherChudzicki Yeah, I saw that and made a note of it. Thanks. Not sure why it wasn't merged, but I've asked him about it.

smarnach commented 8 years ago

@ChristopherChudzicki As I already replied on our internal tracker, I don't remember why I didn't merge it. It was never reviewed, and I probably just lost track of that PR.

bdero commented 8 years ago

This issue was fixed by #10 .

itsjeyd commented 8 years ago

@ChristopherChudzicki FYI^^