Skip to content

Commit

Permalink
Add will-change CSS property to ol.Overlay element
Browse files Browse the repository at this point in the history
  • Loading branch information
fredj committed Oct 8, 2014
1 parent 5cc9f8d commit 0f7df18
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion css/ol.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
right: 8px;
position: absolute;
}

.ol-overlay-container {
will-change: bottom, left, right, top;
}
.ol-scale-line {
background: #95b9e6;
background: rgba(0,60,136,0.3);
Expand Down
4 changes: 3 additions & 1 deletion src/ol/overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,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';

/**
Expand Down

0 comments on commit 0f7df18

Please sign in to comment.