From 064cd5695a959520f3684d1f4a4f6be4d49c77f1 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Sat, 25 Oct 2014 14:43:20 +0200 Subject: [PATCH 1/3] Add will-change CSS property to scale line and rotate controls --- css/ol.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/css/ol.css b/css/ol.css index 390298a0ea..a418147c09 100644 --- a/css/ol.css +++ b/css/ol.css @@ -21,6 +21,7 @@ font-size: 10px; text-align: center; margin: 1px; + will-change: contents, width; } .ol-unsupported { display: none; @@ -101,6 +102,7 @@ display: block; font-weight: normal; font-size: 1.2em; + will-change: transform; } .ol-touch .ol-control button { font-size: 1.5em; From dcba9f2ff4286e64b43e0e69b3bdefaba0bf0752 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Sat, 25 Oct 2014 14:45:27 +0200 Subject: [PATCH 2/3] Add a 'ol-overlay-container' CSS class to the overlay element --- src/ol/overlay.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ol/overlay.js b/src/ol/overlay.js index 5d3a30fe18..759fe0f348 100644 --- a/src/ol/overlay.js +++ b/src/ol/overlay.js @@ -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'; /** From 1a80c0ef01dffad44369357e6f123015750ab2e6 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Sat, 25 Oct 2014 14:49:05 +0200 Subject: [PATCH 3/3] Add will-change CSS property to ol-overlay-container elements --- css/ol.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/css/ol.css b/css/ol.css index a418147c09..0af4ace477 100644 --- a/css/ol.css +++ b/css/ol.css @@ -23,6 +23,10 @@ margin: 1px; will-change: contents, width; } +.ol-overlay-container { + will-change: left,right,top,bottom; +} + .ol-unsupported { display: none; }