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

Making ol.Overlay accept offset values if positioning right or bottom #2619

Merged
merged 1 commit into from Aug 27, 2014
Merged

Making ol.Overlay accept offset values if positioning right or bottom #2619

merged 1 commit into from Aug 27, 2014

Conversation

simonseyock
Copy link
Member

When ol.Overlay has set positioning is set to right or bottom, no offset is applied. I added the missing calculations.
I made 2 fiddles showing the bahaviour before and after.
The divs in the fiddles are named after their positioning (anchor point)! Not the actual position!
Before: http://jsfiddle.net/simon_seyock/ob7ggtx6/
As you can see, on div named "bottom-right" no offset at all is applied. On "bottom-center" it is only applied horizontally and on "center-right" only vertically.
After: http://jsfiddle.net/simon_seyock/sL2f3nL9/2/
All offsets are applied correctly, you could draw a straight line through the anchor points of every div.

When ol.Overlay has set positioning is set to right or bottom, no offset is applied. I added the missing calculations.
I made 2 fiddles showing the bahaviour before and after.
The divs in hte fiddles are named after their positioning (anchor point)! Not the actual position!
Before: http://jsfiddle.net/simon_seyock/ob7ggtx6/
As you can see, on div named "bottom-right" no offset at all is applied. On "bottom-center" it is only applied horizontally and on "center-right" only vertically.
After: http://jsfiddle.net/simon_seyock/sL2f3nL9/2/
All offsets are applied correctly, you could draw a straight line through the anchor points of every div.
@tonio
Copy link
Member

tonio commented Aug 27, 2014

LGTM. Anyone opposed to get this in for 3.0 ?

@bartvde
Copy link
Member

bartvde commented Aug 27, 2014

no objection from me @tonio

@tonio
Copy link
Member

tonio commented Aug 27, 2014

thanks @bartvde

tonio added a commit that referenced this pull request Aug 27, 2014
Making ol.Overlay accept offset values if positioning right or bottom
@tonio tonio merged commit 55005cf into openlayers:master Aug 27, 2014
@tonio
Copy link
Member

tonio commented Aug 27, 2014

and thanks for the patch @simonseyock (-:

@elemoine
Copy link
Member

@simonseyock, I don't think we have a CLA from you? Could you please sign it? See https://github.com/openlayers/cla/blob/master/README.md. The procedure is pretty straightforward. Thanks.

@elemoine elemoine added this to the v3.0.0 milestone Aug 27, 2014
@simonseyock
Copy link
Member Author

It's on the way.

2014-08-27 11:04 GMT+02:00 Éric Lemoine notifications@github.com:

@simonseyock https://github.com/simonseyock, I don't think we have a
CLA from you? Could you please sign it? See
https://github.com/openlayers/cla/blob/master/README.md. The procedure is
pretty straightforward. Thanks.

Reply to this email directly or view it on GitHub
#2619 (comment).

@ahocevar
Copy link
Member

CCLA received. Thanks!

@simonseyock simonseyock deleted the ol3-overlay-offset branch August 29, 2014 17:39
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.

None yet

5 participants