publiclab / mapknitter

Upload your own aerial images, position (rubbersheet) them in a web interface over existing map data, and share via web or composite and export for print.
http://mapknitter.org
GNU General Public License v3.0
267 stars 210 forks source link

Follow-up fixes to synchronous editing #1097

Open jywarren opened 4 years ago

jywarren commented 4 years ago

Noting some suggested fixes/next steps to get synchronous editing working, from this comment by @sashadev-sky -- https://github.com/publiclab/mapknitter/pull/959#issuecomment-530625451

Live synchronous editing will not work I am fairly sure. The code itself has a lot of bugs and it throws errors. Also a lot of code smells, it recopied the code in Map.js that was there before I updated it here.

Mainly, heres the most problematic part: https://github.com/publiclab/mapknitter/blob/bdab16c0bb119700037198e0cb576b3d1d5519da/app/assets/javascripts/mapknitter/Map.js#L512-L528

The data parameter passed to the success function is always just going to be "success". Then in later functions this parameter is assumed to be a warpable.

If i were to try to fix this, how would I test synchronous editing? Not familiar with how this works

To illustrate how it is supposed to work, check out this comment by @ViditChitkara !

https://github.com/publiclab/mapknitter/pull/805#issuecomment-513361816

and https://github.com/publiclab/mapknitter/pull/957

Here's an in-progress GIF -- some bugs with it have already been fixed, but it shows how to test the system:

jywarren commented 4 years ago

Hi @ViditChitkara do you think you could go through this and check on Sasha's suggestions? I'll work with Sebastian on the server side of things so let's just be sure this all works as expected in any edge cases!

ViditChitkara commented 4 years ago

That's great---will have to recall somethings related to this. Will get back on this!!

ViditChitkara commented 4 years ago

Left some comments on #959 . Let's see.

ViditChitkara commented 4 years ago

any suggestions here would be very helpful @publiclab/reviewers