ingress-intel-total-conversion
ingress-intel-total-conversion copied to clipboard
Layer count area
Implements showing the area of selected existing fields or drawn triangles. Addresses #246
NB: Assumes a drawn polygon is a triangle and only considers the first three points. To generalise this to any polygon would be a lot more work (either splitting it up into triangles and summing them, or doing a 'line scan' different method).
Please rebase your additions on master
branch.
And it'd be nice to include here some screenshot of plugin in work.
We do not want ANY polygon, we want triangles only! So just use those polygons that have exactly 3 nodes.
and only considers the first three points.
Wrong. All non-triangles should be rejected.
So, show an area of 0 m^2 if a polygon had more than 3 points, or adjust the output to not even show an area string?
Keeping in mind that if there are multiple polygons at the point clicked, with some being triangles and others with 4+ points, it will still count the triangles and show their total area.
I could make it explicit with s/Area/Triangles Area/ in the polygon output.
I have no suggestion on this, as I never seen your plugin at work. Consider this https://github.com/IITC-CE/ingress-intel-total-conversion/pull/254#issuecomment-530770226
353cac732857768da0e1e1c774bfbd4a76635e55 so we only work on triangles (and explicitly state polygon area is only for triangles) 2867a628c7e74dfc7931f493e58be553c6a93310 comments out most of the debug console.log'ing, leaving just a few in case of bugs. (Edit: I'd forgotten to commit and cited the wrong commit IDs)
Now I'll see if this will rebase cleanly on master.
That's it rebased on master, but now it doesn't work because master doesn't work on Firefox 69.0 on Linux. That's why I was basing this on test-builds in the first place. See #247
So, if you want to check this you'll need to use https://github.com/Athanasius/iitc-ce_ingress-intel-total-conversion/pull/new/layer-count-area_test-builds
Working on some screenshots now.
That's it rebased on master, but now it doesn't work
To make it work can cherry-pick this commit https://github.com/johnd0e/ingress-intel-total-conversion/commit/55c52bcbf2f57a2d201443033379f748ea4463f0
Working on some screenshots now.
https://miggy.org/games/ingress/IITC/layer-count-area/
Hopefully the filenames are self-explanatory. Yes, the red squares and arrows were "added in post" and aren't part of the changes. They're there just to make it clear where I clicked (cursor wouldn't capture) for each output.
That's it rebased on master, but now it doesn't work
To make it work can cherry-pick this commit johnd0e@55c52bc
Confirmed working with this commit, but I assume I shouldn't push that into my branch for this PR.
Why not. It will merge clean.
Why not. It will merge clean.
Done.
No, that will not merge clean. You should first cherry-pick https://github.com/johnd0e/ingress-intel-total-conversion/commit/55c52bcbf2f57a2d201443033379f748ea4463f0, than rebase your changes on top of it.
No, that will not merge clean. You should first cherry-pick johnd0e@55c52bc, than rebase your changes on top of it.
Now acceptable ?
Now we are at least able to review the PR. (I cannot give any forward promise that we accept it)