-
Notifications
You must be signed in to change notification settings - Fork 620
feat: make scan box size customizable #701
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
Conversation
124c3c0 to
855b90b
Compare
|
For iOS, would this work for subsequent camera sessions as well? As in, after the first successful session, when the user quits the screen and comes back, would the barcodeFrameSize get set again using the initial prop and update the scannerFrameSize -> rectOfInterest? Did you get a chance to test this? Thank you for the contribution! @phlpsong |
|
@yalanyali Thanks for your comment. I think it works fine in your described case, but there is a issue that the |
|
Looks good on the surface. I'm unsure about the math but we shall see. |
|
Is there a reason you did not add the new architecture counterpart for this prop @phlpsong ? I can see you hardcoded the values in the Maybe it is not documented well enough, I'll add the missing things to #690 since without it, new arch does not compile. |
|
@WoLewicki Thank you for figuring this out, I think I'm not aware of the new architecture part. And which hardcode values you mean in interface and delegate? I checked but could not tell this part, the frame size has default value but not hardcoded. It's great if you could optimize this part of doc, it will help others understand this. |
I meant you added the implementation to Another thing I see is that you meant those props to be |
|
OK, I thought we should implement the delegate and interface, I just checked the file header it's auto gen right? No, I'm not declare the size to be The reason of cast them to int is |
Here: https://github.com/teslamotors/react-native-camera-kit/pull/701/files#diff-5011dc3d3aefd7b67661ffa11130868519526e31f62f630ebf6ddc2d7f714e09R243 I can see that you cast them to |
|
I think the main reason is followed previous defined size type, and need I checked, looks good! Thank u for figuring this out. |
|
I merged @WoLewicki 's related fixes as well as his original proposal. You can install from master until we make a release (I'd like to test myself before we bump the version officially). |
Summary
Add
barcodeFrameSizeprop toCameraView, make code scan box size customizable.This PR may fix some issues like #380 #552 #485
How did you test this change?
Run example on Android/iOS and change the prop
barcodeFrameSize.