I have found the source of the problem; addPath() and more specifically the onLayout() callback in the render function of SketchCanvas.js is no longer triggered except at launch, where no paths exist. This is probably due to some of the optimizations done in 0.7.0, but I actually couldn't deduce the exact cause--the rendering code on iOS has grown outside of my expertise!
The result is that addPath:strokeColor:strokeWidth:points: is no longer being called. As a workaround (but also maybe a better fix), I have added a call to the onPathsChange() event when endPath() is triggered.
Additional suggestion @terrylinla - we should probably pull out the entire addPath:strokeColor:strokeWidth:points: function, as well as its up & downstream stuff. I just didn't want to do this because I am a little out of date on the repo in general.
Fixes #95
I have found the source of the problem;
addPath()
and more specifically theonLayout()
callback in the render function ofSketchCanvas.js
is no longer triggered except at launch, where no paths exist. This is probably due to some of the optimizations done in 0.7.0, but I actually couldn't deduce the exact cause--the rendering code on iOS has grown outside of my expertise!The result is that
addPath:strokeColor:strokeWidth:points:
is no longer being called. As a workaround (but also maybe a better fix), I have added a call to theonPathsChange()
event whenendPath()
is triggered.Additional suggestion @terrylinla - we should probably pull out the entire
addPath:strokeColor:strokeWidth:points:
function, as well as its up & downstream stuff. I just didn't want to do this because I am a little out of date on the repo in general.