Open oleksandr-danylchenko opened 5 days ago
Sorry, in this case I have to contradict. I'm fine if we find sensible names for it. But this way, when I looked at those methods for a second time, I had already forgotten what direction "normalize" vs. "denormalize" goes. Having two args of the same type doesn't help either. We're really talking about a single line of code here, and it's pretty obvious what it does if you see it. But with just generic "(de)normalize" as name, readability IMO suffers massively, for a single line of (readable) avoided code.
Hmm, that's reasonable. Maybe I overprojected my familiarity with the "normalize/denormalize" functions.
Would smth like the "toParentBounds
" & "toViewportBounds
" sound clearer to you?
Changes Made
Reverted the https://github.com/recogito/text-annotator-js/commit/945c09db538bf6bedfe4740be14bdeb872b275bf commit, where the
normalizeRects.ts
utility file was deleted. However, its utilities are used by the consumers that implement custom popup components.