Remove jQuery dependency

This commit is contained in:
Tom MacWright
2012-10-26 14:11:19 -04:00
parent 0211130b37
commit 23faba55c3
4 changed files with 3 additions and 11 deletions

View File

@@ -8,7 +8,6 @@
</head>
<body>
<script type="text/javascript" src="js/lib/underscore-min.js"></script>
<script type="text/javascript" src="js/lib/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="js/lib/d3.v2.min.js"></script>
<script type="text/javascript" src="js/iD/actions/UndoStack.js"></script>
@@ -63,8 +62,8 @@
var map = iD.Map({
selector: "#map",
connection: connection,
width: $(document).width(),
height: $(document).height()
width: window.innerWidth,
height: window.innerHeight
});
map.setZoom(18)
.setCentre({ lat: 40.7965621, lon: -74.4773184 });

View File

@@ -85,10 +85,7 @@ iD.Connection = function(apiURL) {
function loadFromURL(url, callback) {
// summary: Load all data from a given URL.
$.ajax({
url: url,
success: parse(callback)
});
d3.xml(url, parse(callback));
}
// Private functions to parse DOM created from XML file

View File

@@ -28,9 +28,7 @@ iD.Way = function(connection, id, nodes, tags, loaded) {
iD.Way.prototype = {
// JOSM: http://josm.openstreetmap.de/browser/josm/trunk/src/org/openstreetmap/josm/data/osm/Way.java#L466
isClosed: function() {
// summary: Is this a closed way (first and last nodes the same)?
return this.nodes.length > 1 &&

File diff suppressed because one or more lines are too long