MAGN-1429 : Need snapping in inputs

This is the fix for port snapping issue. 

Today, the connector is not snapped to the ports automatically. Every time the user has to drag the connector on to the port and click the port to get an active connection.

After this Fix, When the connector is dragged near the port, it will get snapped to the port immediately. The connection will be showed as dotted lines, indicating the possible path to the port. When the port is clicked, the connection will be made active. 

http://adsk-oss.myjetbrains.com/youtrack/issue/MAGN-1429

- [ ] @pboyer 
- [ ] @Steell 
- [ ] @Benglin 
- [ ] @ikeough 
Is there a way that you can pass an enum rather than a string as `eventType`?  

Consider reading this post about including a `default` clause:

http://stackoverflow.com/questions/4649423/should-switch-statements-always-contain-a-default-clause

I always try to include one to make the behavior explicit.