mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 05:30:35 +02:00
Inline image css to fix selector perf, was about 3%
This commit is contained in:
+8
-6
@@ -22,6 +22,13 @@ body {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* Mobile Tweaks
|
||||
------------------------------------------------------- */
|
||||
* {
|
||||
-webkit-tap-highlight-color:rgba(0,0,0,0);
|
||||
-webkit-touch-callout:none;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 25px;
|
||||
line-height: 1.6;
|
||||
@@ -1035,9 +1042,4 @@ div.typeahead a:first-child {
|
||||
left: 30px;
|
||||
}
|
||||
|
||||
/* Mobile Tweaks
|
||||
------------------------------------------------------- */
|
||||
* {
|
||||
-webkit-tap-highlight-color:rgba(0,0,0,0);
|
||||
-webkit-touch-callout:none;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,12 @@ iD.Background = function() {
|
||||
transformProp = iD.util.prefixCSSProperty('Transform'),
|
||||
source = d3.functor('');
|
||||
|
||||
var imgstyle = 'position:absolute;transform-origin:0 0;' +
|
||||
'-ms-transform-origin:0 0;' +
|
||||
'-webkit-transform-origin:0 0;' +
|
||||
'-moz-transform-origin:0 0;' +
|
||||
'-o-transform-origin:0 0;';
|
||||
|
||||
function atZoom(t, distance) {
|
||||
var power = Math.pow(2, distance);
|
||||
var az = [
|
||||
@@ -82,7 +88,7 @@ iD.Background = function() {
|
||||
}
|
||||
|
||||
image.enter().append('img')
|
||||
.attr('class', 'tile')
|
||||
.attr('style', imgstyle)
|
||||
.attr('src', function(d) { return d[3]; })
|
||||
.on('error', error)
|
||||
.on('load', load);
|
||||
|
||||
Reference in New Issue
Block a user