Skip to content

Refactor js code to avoid duplicated calculations #63

@scardanzan

Description

@scardanzan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    To Do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions