map.on('pm:edit', function (e) {

should be drawnItems.on('pm:edit', function (e) { 

e is not very helpful without a lot of work. It does not contain the id of the shape being edited nor does it contain the selected vertex. You would have to compare the e._layers to an earlier copy to get meaningful data