DrawUI
DrawUI copied to clipboard
Review updating strokes with incoming events
In MMDrawModel near line 56:
// TODO: It's possible for an update to come in for a previous stroke
// after a new stroke has aleady been started. In that case, the
// for loop below will never be run to find the correct stroke,
// and the isSameTouchAsEvent: will also fail, causing the event
// to be lost.
Also in [MMDrawnStroke addEvent:], all of the elements events were re-mapped into _eventIdToSegment instead of only elementEvents. Verify that using elementEvents is enough.
I think the correct strategy is to check for existing stroke's waitingForEvent: immediately if either !strokeForEvent or [[strokeForEvent event] isSameTouchAsEvent:event]. This way a stroke is found if the current active stroke isn't a match as well.