Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BREAKING refactor(util): boundingBoxFromPoints, removed transform #8269

Merged
merged 5 commits into from Sep 11, 2022

Conversation

ShaMan123
Copy link
Contributor

@ShaMan123 ShaMan123 commented Sep 11, 2022

  • accept n points, not only 4
  • remove optional transform arg (resolves safeguarding points from mutation)
  • add test

@github-actions
Copy link
Contributor

github-actions bot commented Sep 11, 2022

Coverage after merging refactor-boundingBoxFromPoints into master will be

81.11%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
dist
   fabric.js79.44%75.59%84.74%81.11%10003, 10022–10024, 10026–10027, 10089, 10143, 10158, 10214, 10250–10251, 10257, 10261–10262, 10277, 10311, 10342–10343, 10367, 10375, 10462, 10494–10495, 10570–10571, 10574, 10579, 10601, 10601, 10601, 10601, 10601, 10601, 10601–10602, 10604–10605, 10605, 10605–10606, 10611, 10613, 10619, 10619, 10619, 10619, 10619–10620, 10622–10626, 10626, 10626–10628, 10630–10631, 10640, 10651, 10662, 10673, 10683–10686, 10694–10695, 10695, 10695–10696, 10698–10699, 10706, 10710, 1085, 11307, 11312, 11354–11356, 11356, 11356, 11356, 11356, 11356–11357, 11377, 11382–11383, 11423, 11423, 11423, 11423, 11451, 11451, 11451, 11453, 116, 1160, 11601–11602, 11613, 1162–1163, 1165–1166, 1173, 1177, 11770–11771, 11778, 11821, 11828, 11828, 11837–11838, 11849, 1185, 11889, 11897, 119, 11916–11918, 11945–11946, 11949, 11949, 11966–11968, 120, 12071, 121, 12156–12157, 12159–12160, 12167, 12191, 1221, 1223, 1223, 1223, 1223, 1223–1224, 12256–12257, 12261, 12341, 12352, 12357, 12394, 12495, 12495, 12495, 12519–12520, 12628, 12631, 12693, 12699, 12706, 12713, 12719, 12725, 12732, 12739, 12745–12746, 12746, 12746, 12761–12762, 12770, 12779, 12779, 128, 12804–12807, 12846, 12889–12890, 129, 129, 129, 129, 129, 129, 129, 12930–12931, 130, 13064–13065, 131, 13210, 133, 13302, 13365, 13368, 13421–13422, 13422, 13422, 13425, 13440, 13454, 13466–13467, 13469, 13481–13482, 13484, 13499, 13514–13515, 13517–13518, 13520–13521, 13531, 13561, 13561, 13561, 13561, 13561, 13561, 13561, 13561, 13586, 13588, 13588–13590, 13643–13645, 13668, 13676, 13682–13683, 13724, 13787–13788, 13822, 13843–13844, 1390, 1390, 13903, 13903, 13903, 13903, 13903, 13908–13916, 1392, 13958, 14084–14085, 14121, 14130, 14151, 14151, 14151–14152, 14152, 14152, 14152, 14152–14153, 14159–14161, 14164–14165, 14178, 14178, 14178–14179, 14179, 14179, 14179, 14179–14180, 14186–14188, 14191–14192, 14205–14206, 14280, 14329, 14333, 1442, 14458, 14488–14489, 14489, 14489–14490, 14490, 14490–14491, 14493, 14493, 14493–14494, 14497, 14504, 14589, 14702, 14751, 14821, 14825, 14895, 14952–14953, 14967, 15017–15018, 15020–15021, 15113, 15173, 15176, 15251, 15254, 15269–15270, 15279, 15321, 15325, 15350–15351, 15385, 15389, 1562, 15655, 15659, 15823, 15826, 15833–15834, 15834, 15834–15836, 15838, 15838, 15838–15840, 15840, 15840–15842, 15932, 15937–15939, 15967–15968, 16035, 16038, 16038, 16038–16039, 16041–16042, 16042, 16042–16043, 16043, 16043, 16045–16046, 16048, 16051, 16078, 16078–16080, 16129, 16129, 16164, 16199, 16199, 16199, 16202–16203, 16205, 16205, 16209, 16212, 16215, 16217–16218, 16227, 1623, 16232, 16232–16234, 16234, 16245–16246, 16255, 16255, 16255, 16255, 16255–16256, 16256, 16256–16258, 16258–16259, 16259, 16276–16277, 16277, 16277, 16299–16300, 16300, 16300, 16300, 16300, 16300, 16312, 16312, 16315–16319, 16319, 16358, 16397, 16429, 16432–16435, 16445, 16458, 16473, 16490, 16499, 16503, 16555, 16557–16559, 16573, 16575–16576, 16592, 16644, 16667, 16800, 16863–16865, 16865–16866, 16866, 16894, 16939–16942, 16949, 16951–16952, 16967–16969, 16979, 16979, 16979, 17042, 17054, 17054, 17101–17102, 17120–17121, 17142, 17183, 17183–17184, 17201–17204, 17204, 17204–17205, 17207, 17207, 17207–17208, 17210–17211, 17211, 17211–17212, 17214, 17214, 17214–17215, 17217–17218, 17222–17223, 17270, 17314, 17383, 17388, 17412–17413, 17422–17426, 17438–17441, 17446, 17455–17456, 17458, 17467, 17467, 17467, 17467, 17467–17468, 17470–17471, 17487–17488, 17490–17491, 17498–17501, 17504, 17507, 17509–17510, 17510, 17510, 17510, 17510, 17510, 17510–17511, 17513, 17515–17516, 17516, 17516–17519, 17521, 17528–17536, 17536, 17536–17538, 17541, 17549–17552, 17558–17559, 17559, 17559–17560, 17562, 17562, 17562–17563, 17565, 17567–17568, 1757–1758, 17583, 17585, 17585, 17585–17586, 17588–17589, 17589–17590, 17590, 17596, 17596, 17598, 17598–17599, 17599, 17608–17610, 17610, 17610–17618, 17624, 17624, 17624–17626, 17628, 17634–17635, 17649–17655, 17655, 17655–17656, 17659, 17661, 17673, 17673, 17673–17674, 17677–17679, 17689, 17689, 17689–17691, 17703, 17703, 17703–17704, 17706–17707, 17707, 17707–17708, 17710–17711, 17711, 17711–17714, 17714, 17714–17715, 17717, 17717, 17717–17718, 17721–17722, 17725, 17727–17728, 17728, 17728, 17728, 17728–17730, 17744–17746, 17748–17749, 17760, 17762, 17764–17767, 17824, 17890, 17890,

@ShaMan123 ShaMan123 changed the title refactor(): boundingBoxFromPoints refactor(util): boundingBoxFromPoints Sep 11, 2022
@asturur
Copy link
Member

asturur commented Sep 11, 2022

This is a change i wanted to do as well.
The issue here is to verify if is better the reduce on the point logic or the more basic map with math.max and math.min single call on the resulting array.

Should be able to benchmark quicjly

@asturur
Copy link
Member

asturur commented Sep 11, 2022

definitely this is better with a single loop vs 2 necessary loops on the other way.

@asturur asturur changed the title refactor(util): boundingBoxFromPoints BREAKING refactor(util): boundingBoxFromPoints, removed transform Sep 11, 2022
@asturur asturur merged commit 310c6f3 into master Sep 11, 2022
@ShaMan123 ShaMan123 deleted the refactor-boundingBoxFromPoints branch September 11, 2022 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants