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

Mini-window is drawn only for last tab #26

Open
gloubibou opened this issue Dec 16, 2014 · 0 comments
Open

Mini-window is drawn only for last tab #26

gloubibou opened this issue Dec 16, 2014 · 0 comments

Comments

@gloubibou
Copy link

Dragging a tab out of the tab button bar should show a mini-window as dragging image.

This works only for the last tab. For other tabs, this is skipped because no destinationIndexForDraggedItem was set on the tab view during draggingEntered:

As a workaround, I have modified -[MMTabDragAssistant _destinationIndexForButton:atPoint:inTabBarView:] at line 570 to set resultingIndex without testing aPoint against lastFrame:

           else if ([self isDragging]) {
                if ([tabBarView destinationIndexForDraggedItem] != NSNotFound)
                    resultingIndex = [tabBarView destinationIndexForDraggedItem];
                else {
                    resultingIndex = [tabBarView numberOfVisibleTabViewItems];
                }
            }

Now draggingEntered: defaults to setting destinationIndexForDraggedItem to the number of tab items. During draggingExited:, MMTabDragAssistant:932 now considers the tab bar to have participated in the dragging operation.

I have not created a pull request as I am not sure what further implications this change will have.

TAKeanice added a commit to TAKeanice/MMTabBarView that referenced this issue Oct 12, 2020
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

No branches or pull requests

1 participant