mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-19 15:08:23 +02:00
Fixup active casings, shorter prefix detection.
This commit is contained in:
+3
-3
@@ -46,9 +46,9 @@ path.casing:hover {
|
||||
}
|
||||
|
||||
path.casing.active {
|
||||
stroke:#FFF9C9;
|
||||
stroke-opacity:1;
|
||||
stroke-width:8;
|
||||
stroke:#FFF9C9 !important;
|
||||
stroke-opacity:1 !important;
|
||||
stroke-width:10 !important;
|
||||
}
|
||||
|
||||
path.stroke {
|
||||
|
||||
@@ -56,6 +56,7 @@ iD.History.prototype = {
|
||||
}
|
||||
},
|
||||
|
||||
// generate reports of changes for changesets to use
|
||||
modify: function() {
|
||||
return this.stack[this.index].creations();
|
||||
},
|
||||
|
||||
+7
-13
@@ -81,19 +81,8 @@ iD.Map = function(elem, connection) {
|
||||
arrow.remove();
|
||||
return alength;
|
||||
})(),
|
||||
transformProp = (function(props) {
|
||||
var style = document.documentElement.style;
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
if (props[i] in style) return {
|
||||
transform: 'transform',
|
||||
WebkitTransform: '-webkit-transform',
|
||||
OTransform: '-o-transform',
|
||||
MozTransform: '-moz-transform',
|
||||
msTransform: '-ms-transform'
|
||||
}[props[i]];
|
||||
}
|
||||
return false;
|
||||
})(['transform', 'WebkitTransform', 'OTransform', 'MozTransform', 'msTransform']);
|
||||
prefix = prefixMatch(['webkit', 'ms', 'Moz', 'O']),
|
||||
transformProp = prefix + 'transform';
|
||||
|
||||
defs.append('clipPath')
|
||||
.attr('id', 'clip')
|
||||
@@ -103,6 +92,11 @@ iD.Map = function(elem, connection) {
|
||||
|
||||
var tileclient = iD.Tiles(tilegroup, projection);
|
||||
|
||||
function prefixMatch(p) { // via mbostock
|
||||
var i = -1, n = p.length, s = document.body.style;
|
||||
while (++i < n) if (p[i] + 'Transform' in s) return '-' + p[i].toLowerCase() + '-';
|
||||
return '';
|
||||
}
|
||||
function ll2a(o) { return [o.lon, o.lat]; }
|
||||
function a2ll(o) { return { lon: o[0], lat: o[1] }; }
|
||||
function roundCoords(c) { return [Math.floor(c[0]), Math.floor(c[1])]; }
|
||||
|
||||
Reference in New Issue
Block a user