This repository was archived by the owner on Aug 12, 2021. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR aims to gather few changes to prepare for
[email protected]
.This is a major bump as few of the changes listed below are breaking changes.
In fact, quite a few methods and properties have been renamed, but the API won't change that much anymore, hopefully. 😇
REMOVED:
clearButtonHidden
property and the internal_clearButton
view have been removed. This is because theclear
method has now to be called from an outside component (that was the goal for a long time!).CHANGED:
>= 0.40
is now compatible out of the box. This is a breaking change for people using with in an older version of React Native (Hotfix: React Native 0.40 compatibility #20).fillColor
property has been changed to benull
by default, in order to get a transparent background out of the box.imageType
property to export the drawing is nowpng
by default, in the same effort for a transparent background. You can still set it tojpg
if you want.onReset
event callback has been renamed toonClear
.saveImage
method has been renamed tosave
AND doesn't require any argument anymore. We keep the state of the drawing in the bridge for you, so that you don't need to keep a reference of the encoded representation of the image on every change. TheonChange
still exists, and is still returning the base64 representation of the drawing, but you don't have to save it into your component's state in order to pass it tosave
later on.clear
andsave
are now Promises, allowing you to type:README.md
has been updated with more documentation.ADDED:
examples
folder has been created.Let me know your thoughts!
(I'm thinking of you guys who helped me before: @blargity @vccabral @stantoncbradley @gensc004 @alexsotocx)