Merge pull request #2691 from fredj/will-change

Add will-change CSS properties
This commit is contained in:
Frédéric Junod
2015-03-11 12:15:44 +01:00
2 changed files with 9 additions and 1 deletions

View File

@@ -21,7 +21,12 @@
font-size: 10px;
text-align: center;
margin: 1px;
will-change: contents, width;
}
.ol-overlay-container {
will-change: left,right,top,bottom;
}
.ol-unsupported {
display: none;
}
@@ -101,6 +106,7 @@
display: block;
font-weight: normal;
font-size: 1.2em;
will-change: transform;
}
.ol-touch .ol-control button {
font-size: 1.5em;

View File

@@ -90,7 +90,9 @@ ol.Overlay = function(options) {
* @private
* @type {Element}
*/
this.element_ = goog.dom.createElement(goog.dom.TagName.DIV);
this.element_ = goog.dom.createDom(goog.dom.TagName.DIV, {
'class': 'ol-overlay-container'
});
this.element_.style.position = 'absolute';
/**