0140454 / hackbar

A browser extension for Penetration Testing
428 stars 62 forks source link

Fix re-computation problem #44 #46

Closed HSwift closed 7 months ago

HSwift commented 7 months ago

Fixed #44 in my chrome after removing all postControlWrapped related code

0140454 commented 7 months ago

Thanks for contribution!

However, please change commit title to Remove ....

Furthermore, do you want to add yourself into Contributor list in README?

HSwift commented 7 months ago

It looks like I'm failing to change the commit titile. You may need to squash and merge this PR to change the commit titile.

0140454 commented 7 months ago

CI is relevant

0140454 commented 7 months ago

By the way, if we change selectCenter != switchCenter to Math.ceil(selectCenter) != Math.ceil(switchCenter), does it work as expected?

Could you help me test it?

HSwift commented 7 months ago

It works as expected in my chrome, and their difference is about 0.000009. If you're sure the difference isn't too big, I'd prefer Math.abs(selectCenter-switchCenter) < 0.0001

0140454 commented 7 months ago

The postControlWrapped is used to decide what CSS class should be applied to the VSwitch and VTextarea for aligning them with other components. If we can fix the re-computation problem, I prefer to keep it.

Therefore, could you solve #44 via keeping postControlWrapped and using your method to compare selectCenter and switchCenter ?

Thank you.

0140454 commented 7 months ago

CI is relevant.

You can execute yarn lint:fix to resolve it, and then update this PR.