The “ViewportBoundsChanged” DiagramEvent will have a DiagramEvent.subject that is a JavaScript object whose scale property is the old Diagram.scale value and whose position property is the old Diagram.position value.
So for example if you want to see if the scale had changed:
if (e.subject.scale !== e.diagram.scale) . . .
Or if you want to know whether the position had changed:
if (!e.subject.position.equals(e.diagram.position)) . . .
Note that when the Diagram.scale changes it is almost always the case that the Diagram.position will change.