In several methods there is logic that is repeated, specially conditions and offset calculations in directionConfig.
A suggestion is to generate helper methods for the needed calculations and predicates for top, bottom, right and left and reuse those helper methods to compose directions like top-right or bottom-left. That way changes on the condition for top drag or top offset are in a single location, reducing oportunities for inconsistencies to show up for different directions.
In several methods there is logic that is repeated, specially conditions and offset calculations in directionConfig.
A suggestion is to generate helper methods for the needed calculations and predicates for top, bottom, right and left and reuse those helper methods to compose directions like top-right or bottom-left. That way changes on the condition for top drag or top offset are in a single location, reducing oportunities for inconsistencies to show up for different directions.