-
Notifications
You must be signed in to change notification settings - Fork 230
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
Have the option of making the sketchfield resize on other events than window resize #7
Comments
Dear @FerusAndBeyond thank you for your input, I have resolved the issue by adding controlled properties width and height, please check if possible and let me know if it is ok, you can see the example page as well. |
Changing width and height works perfectly now, thanks! Though unless I did something wrong I noticed 2 issues when height and width are not specified. The height is set to 512 by this statement:
Changing {height:512} to {} removed this issue. Also in the configuration options it says if you leave height/width empty it will scale to parent but that does not seem to be the case for me. |
Yes you are right, I have added a reasonable default value for height, I will correct the documentation. The other option would be to leave it blank and will automatically scale to parent height as well, but this would mean that to use the component you would have to be careful to strictly define the parent height. Hope it helps |
Yes I understand, I was just confused by the documentation. |
Cool thx, hope you like the new feature/bug fix |
I wanted to have a resizable sketch field but when I resize it (change height and width props of SketchField) the canvas stays the same size. To make it work I had to manually trigger the resize event of window. Like this:
The text was updated successfully, but these errors were encountered: