move dock positioning code into its own class

Authored by mvourlakos on Nov 29 2018, 7:30 PM.