Translating canvas mouse position to JointJS matrix coordinates

If you need a way to convert the JointJS mouse position to the canvas matrix coordinates, this is a simple way to do it (in combination with an angular mouse wheel event):

Short, but hopefully helpful! Cheers!