code not working, but need to change logic.
counting all deltas to calc. dockWidth does not work. each connection needs to be calculated and rounded.
needs fix!