Enable advanced uglify compression, remove unused variables

This commit is contained in:
Tom MacWright
2013-02-27 12:13:59 -05:00
parent 89ee4244ff
commit 5829438391
9 changed files with 13 additions and 16 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ iD.js: Makefile
%.min.js: %.js Makefile
@rm -f $@
$(JS_COMPILER) $< -o $@
$(JS_COMPILER) $< -c -m -o $@
clean:
rm -f iD*.js
-2
View File
@@ -4,8 +4,6 @@ iD.OAuth = function(context) {
keys,
oauth = {};
function keyclean(x) { return x.replace(/\W/g, ''); }
function timenonce(o) {
o.oauth_timestamp = ohauth.timestamp();
o.oauth_nonce = ohauth.nonce();
+3 -3
View File
@@ -80,9 +80,9 @@ iD.svg.Labels = function(projection) {
.data(entities, iD.Entity.key)
.attr({
'startOffset': '50%',
'xlink:href': function(d, i) { return '#halo-' + d.id; }
'xlink:href': function(d) { return '#halo-' + d.id; }
})
.text(function(d, i) { return name(d); });
.text(function(d) { return name(d); });
texts.exit().remove();
@@ -97,7 +97,7 @@ iD.svg.Labels = function(projection) {
halos.enter()
.append('path')
.style('stroke-width', get(labels, 'font-size'))
.attr('id', function(d, i) { return 'halo-' + d.id; })
.attr('id', function(d) { return 'halo-' + d.id; })
.attr('class', classes);
halos.attr('d', get(labels, 'lineString'));
+1 -1
View File
@@ -127,7 +127,7 @@ iD.svg.Lines = function(projection) {
text.selectAll('.textpath')
.filter(filter)
.attr('xlink:href', function(d, i) { return '#shadow-' + d.id; })
.attr('xlink:href', function(d) { return '#shadow-' + d.id; })
.text(function(d) {
// adding longer text than necessary, since overflow is hidden
return (new Array(Math.floor(lengths[d.id] * 1.1))).join(arrowtext);
+1 -1
View File
@@ -2,7 +2,7 @@ iD.svg.MemberClasses = function(graph) {
var tagClassRe = /^member-?/;
return function memberClassesSelection(selection) {
selection.each(function memberClassesEach(d, i) {
selection.each(function memberClassesEach(d) {
var classes, value = this.className;
if (value.baseVal !== undefined) value = value.baseVal;
+1 -1
View File
@@ -27,7 +27,7 @@ iD.ui.keyReference = function(selection) {
.append('tr');
var cols = rows.selectAll('td')
.data(function(d, i) {
.data(function(d) {
return [d.value, d.description || "", d.count];
})
.enter()
+1 -2
View File
@@ -1,7 +1,6 @@
iD.ui.Lasso = function() {
var center, box,
group,
var box, group,
a = [0, 0],
b = [0, 0];
+2 -2
View File
@@ -19,7 +19,7 @@ iD.ui.Success = function(connection) {
connection.changesetUrl(changeset.id);
header.append('a')
.attr('href', function(d) {
.attr('href', function() {
return connection.changesetUrl(changeset.id);
})
.attr('target', '_blank')
@@ -28,7 +28,7 @@ iD.ui.Success = function(connection) {
header.append('a')
.attr('target', '_blank')
.attr('href', function(d) {
.attr('href', function() {
return 'https://twitter.com/intent/tweet?source=webclient&text=' +
encodeURIComponent(message);
})
+3 -3
View File
@@ -89,12 +89,12 @@ iD.ui.TagEditor = function(context) {
presetUI = iD.ui.preset(context)
.entity(entity)
.on('change', function(tags) {
.on('change', function() {
event.changeTags();
});
tagList = iD.ui.Taglist(context)
.on('change', function(tags) {
.on('change', function() {
event.changeTags();
});
@@ -120,7 +120,7 @@ iD.ui.TagEditor = function(context) {
event.changeTags();
}
function apply(entity) {
function apply() {
event.changeTags();
event.close();
}