Skip to content

feat(rnd-dialog): Add drag constraints support for dialog + OnPush optimization#2

Open
RaimonxDev wants to merge 1 commit intoacrodata:mainfrom
RaimonxDev:feat-add-drag-constraints-and-on-push
Open

feat(rnd-dialog): Add drag constraints support for dialog + OnPush optimization#2
RaimonxDev wants to merge 1 commit intoacrodata:mainfrom
RaimonxDev:feat-add-drag-constraints-and-on-push

Conversation

@RaimonxDev
Copy link
Copy Markdown

A drag constraint system was implemented to control the movement boundaries of the dialog:

• RndDialogDragConstraints Interface: Defines individual constraints for each direction (top, right, bottom, left).
• Flexible Configuration: Constraints can be passed through the dialog’s data.

   dragConstraints: RndDialogDragConstraints = {
      top: false,
      right: false,
      bottom: false,
      left: false,
   };

OnPush change detection was applied to improve performance.

To avoid interfering with or creating a new method for configuring the modal, the drag constraints were added via the data property.
If you think there’s a better approach, feel free to suggest changes.

I hope it will be useful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant