This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var MyApp = { | |
addPlaceholders: function(props) { | |
// default configuration | |
var config = { | |
'class': 'placeholder' // apply CSS classes to an input displaying a placeholder | |
}; | |
// if any properties were supplied, apply them to the config object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//for (var i = 0; i < mapPoints.length; i++){ | |
// for (var j = i + 1; j < mapPoints.length; j++){ | |
// var p1 = mapPoints[i]; | |
// var p2 = mapPoints[j]; | |
// if (getDistance(p1, p2) < 0.1){ // If distance between points is greater than .1 km | |
// var midpoint = getMidpoint(p1, p2); | |
// | |
// mapPoints.push(midpoint); | |
// mapPoints.splice(i, 1); | |
// mapPoints.splice(j, 1); |