-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Fixes popups in IE8 and earlier #827
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
Conversation
| if (!filter) try { filter = el.filters.item(filterName); } catch (e) { } | ||
|
|
||
| value = Math.round(value * 100); | ||
| if (value === 100) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This if statement is to fix #600, but personally I don't think it should be there. Rather, it should instead be fixed using css:
.leaflet-marker-icon {
background: transparent;
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF)"; /* IE8 */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF); /* IE6 & 7 */
zoom: 1;
}
If you agree, we can simply use the else section of the statement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like setting filters by default for common elements because IE is known to get slower because of this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a problem with this code: shadow marker icon is all black - it`s not nice. Why?
PS: IE8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xGen do you mean the CSS code above or the pull request in general?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No css, general.
PS: Im sorry, i dont understand how create a new request (i`m new):
i have a problem too with L.Control.Layers:
var CircleLayer = new L.LayerGroup(),
circleLocation = new L.LatLng(55.743, 37.612),
circleOptions = {color: '#f03', opacity: 0.7},
circle = new L.Circle(circleLocation, 500, circleOptions);
CircleLayer.addLayer(circle);
map.addControl(new L.Control.Layers({'Google':glmap},{'circle': CircleLayer}));
When I unchecked /checked 'circle' - circle is appear, but the color is lost.
This apper in IE8 & IE9. In FF 13 is ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like setting filters by default for common elements because IE is known to get slower because of this.
You mean in the CSS? I totally agree - which is why you'd put it inside a conditional comment or perhaps modernizr adds a class that could be used. Either way I don't think it should be this javascript's concern. Not a big one, though.
Thanks for your code changes, so much nicer :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xGen create a http://jsfiddle.net/ test case that reproduces the problem and create a new GitHub issue with the description and a link to it
Fixes popups in IE8 and earlier
|
By the way, currently in master it only sets popup opacities if fadeAnimation is true, and it's not for browsers that don't support transition. So it should have worked before too. |
|
Cleaned up a bit: 3201dd0 |
A bit of contentious code here it seems.
Pull request #667 seems to have broken popups in IE. This happens because in the onAdd function in L.Popup, uses setOpacity we make opacity 0, and then later on sets it to 1. setOpacity as it is written now means that we can never set opacity to 1.