Scripta-Qumranica-Electronica / Scrollery-website

SQE website
MIT License
3 stars 2 forks source link

Fix dilation #77

Closed Bronson-Brown-deVost closed 6 years ago

Bronson-Brown-deVost commented 6 years ago

This is just about ready for merge into master. Right now it overwrites the artefact polygon data in the database, I am waiting for Ingo's API update with changeArtefact functionality.

The fix was to switch from using potrace on the whole raster image of the mask, and to use instead an offscreen canvas to record only the alterations made by the brush. Then a potrace vector polygon from the offscreen canves is either added to or subtracted from the original vector polygon mask using the library js-clipper. That way no changes are made to portions of the vector mask that were unaltered (running potrace more than once on very similar polygons can apparently produce subtly different results).

coveralls commented 6 years ago

Coverage Status

Coverage increased (+1.1%) to 88.099% when pulling 0db889c56e9be3fa574411a6e4f716a894b0b99d on fix-dilation into 3af73c9b504839933de6cfc9fb6fd8da2f1f27dd on master.

Bronson-Brown-deVost commented 6 years ago

I'll check on the coverage, there are simple some tests to add so hopefully I can get it back up.

Bronson-Brown-deVost commented 6 years ago

I will go through some of these changes this afternoon and add some comments. Once I finish that and get Ingo's API updates (maybe later today or tomorrow), this branch will be ready to merge.

sjones6 commented 6 years ago

Sounds good to me!