Skip to content

Catch menus back to browser's window area #46

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

Closed
wants to merge 2 commits into from

Conversation

AlexLnz
Copy link
Contributor

@AlexLnz AlexLnz commented Dec 20, 2017

This is a first approach towards #4 .

@Hughp135
Copy link
Contributor

Hughp135 commented Jan 6, 2018

After looking through your approach, I'm not sure if there is a need for a whole new service just for this functionality.

Is there a reason why you are overriding the position after view init, instead of setting the correct position in sh-context-menu-directive.ts in the setLocation function? It seems the logic could just be added to there and save a lot of extra code.

@AlexLnz
Copy link
Contributor Author

AlexLnz commented Jan 8, 2018

Hi Hughp135,

Thank you for reviewing the code.

Yes, the code for positioning is in a separate class which does the job.
This follows the "single responsibility principle" of agile software design.

Regarding the second point it's not clear to me what you mean and how to save a lot of extra code. Could you elaborate on this?

regards,
Alex

@Hughp135
Copy link
Contributor

Hughp135 commented Jan 8, 2018

After thinking it through it seems the way you have done it is good (as the problem was a bit more complex than I thought at first). Just need to get my local setup working so I can test it out a bit.

@Hughp135
Copy link
Contributor

Hughp135 commented Feb 4, 2018

Have tested this and it seems to work well with LTR menus, but doesn't work for RTL menus.

Also need to merge in master (and move files from src/app to lib/src).

image

@Hughp135 Hughp135 mentioned this pull request Feb 21, 2018
@msarsha msarsha mentioned this pull request Feb 22, 2018
@msarsha
Copy link
Owner

msarsha commented Apr 12, 2018

implemented with #55

Thanks @AlexLnz .

@msarsha msarsha closed this Apr 12, 2018
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.

3 participants