Adds context object to onFinish event to provide more context to how the finish event happened. This means you should be able to do this going forward:
draw.on("finish", (id: string, context: { action: string, mode: string }) => {
if (action === 'draw') {
// Do something for draw finish event
} else if (action === 'dragFeature') {
// Do something for a drag finish event
} else if (action === 'dragCoordinate') {
//
}else if (action === 'dragCoordinateResize') {
//
}
});
Link to Issue
253
PR Checklist
[x] There is a associated GitHub issue
[x] If I have added significant code changes, there are relevant tests
[x] If there are behaviour changes these are documented
Description of Changes
Adds context object to onFinish event to provide more context to how the finish event happened. This means you should be able to do this going forward:
Link to Issue
253
PR Checklist