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

Drag & replace blocks #198

Merged
merged 12 commits into from
Jan 21, 2018
Merged

Drag & replace blocks #198

merged 12 commits into from
Jan 21, 2018

Conversation

Jesus89
Copy link
Member

@Jesus89 Jesus89 commented Jan 20, 2018

Related to: #191

  • Drag & replace Generic, Code & Input blocks (move & create)
  • Add Undo/Redo for replaced blocks
  • Add Drag & replace effect (opacity)
  • Replace wires by name and size (for each side)
  • Replace wires by position for ports with the same name and size (for each side)

Compute the ports for each side: left, right and top. If there are ports with the same name they are ordered by position, from 0 to n.

                   Top ports 0 ·· n
                   _____|__|__|_____
  Left ports 0  --|                 |--  0 Right ports
             ·  --|      BLOCK      |--  ·
             ·  --|                 |--  ·
             n    |_________________|    n

drag replace - 1

drag replace - 2

  • Replace wires by size (for each side)

If there is no match replace the connections if the port's size matches ignoring the port's name.

drag replace - 3

@Jesus89 Jesus89 requested a review from Obijuan January 21, 2018 08:15
Copy link
Member

@Obijuan Obijuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works like a charm.... it is amazing! The new possibilities of this feature are... so powerfull... ¡Thanks a lot Jesus!

@Obijuan Obijuan merged commit 0d9cd05 into FPGAwars:develop Jan 21, 2018
@Jesus89 Jesus89 deleted the 191-drag-replace branch January 21, 2018 12:37
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.

2 participants