Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Controls to implement node resizing #393

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

Heathermcx
Copy link

I have added a ResizeControl which is an ExecutableControl and has an IResizerProvider. Each ResizeControl added to a node adds a 'resizer' which is by default, a small box at the corner of the node. When the resizer is dragged, the node resizes. IResizeProvider provides the position of the resizer and also the behavior for the node when the resizer is dragged. I have included four default implementations of IResizeProvider - one for each corner of a node.

* add test

* add fix

* enable zoom for testing

* finish writing tests

* add fix for remaining resizers

* Revert "enable zoom for testing"

This reverts commit 69fa0aa.

* fix formatting

* make fields nullable

* fix nullables

* use file scoped namespaces
@Heathermcx Heathermcx force-pushed the heather/resizeControl branch from e337190 to 920dc36 Compare March 5, 2024 00:32
@JEDII29
Copy link

JEDII29 commented Aug 14, 2024

When can we expect merge this feature to develop?

@kyctarnik
Copy link

I don`t think it must be part of core. There is 2 reasons.

  1. You have leaked an abstraction in the line "public string? Class => _resizeProvider.Class;" in ResizerProvider.
    Your "provider" now know about view.
  2. You are introducing a new concept that this framework does not operate with
  3. You do not need provider to make resize. You need only one behavior.
  4. If you change the scale while changing the node size, you will catch a bug with the node size.
  5. The position should be determined by control, not behavior (in my understanding). Or, even better, it must be transmitted from the outside.
  6. You forgot about "Snap to grid" option.

@zHaytam am I right?

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.

5 participants