add names to functions to be more descriptive

This commit is contained in:
Konstantin Käfer 2011-01-25 14:40:39 -05:00
parent 1e17152cf0
commit 9358b8b58f

View File

@ -37,7 +37,7 @@ mess.Renderer = function Renderer(env) {
*/
ensureSRS: function(m, callback) {
Step(
function() {
function autodetectSRS() {
var group = this.group();
var autodetect = _.filter(m.Layer, function(l) { return !l.srs; });
_.each(autodetect, function(l) {
@ -72,7 +72,7 @@ mess.Renderer = function Renderer(env) {
// If no layers missing SRS information, next.
autodetect.length === 0 && group()();
},
function(err) {
function waitForDetection(err) {
m.Layer = _.filter(m.Layer, function(l) { return l.srs; });
callback(err, m);
}
@ -91,7 +91,7 @@ mess.Renderer = function Renderer(env) {
localizeExternals: function(m, callback) {
var that = this;
Step(
function() {
function downloadExternals() {
var group = this.group();
m.Layer.forEach(function(l) {
if (l.Datasource.file) {
@ -108,7 +108,7 @@ mess.Renderer = function Renderer(env) {
// Continue even if we don't have any layers.
group()();
},
function(err) {
function waitForDownloads(err) {
callback(err, m);
}
);
@ -123,7 +123,7 @@ mess.Renderer = function Renderer(env) {
localizeStyle: function(m, callback) {
var that = this;
Step(
function() {
function downloadStyles() {
var group = this.group();
m.Stylesheet.forEach(function(s, k) {
if (!s.id) {
@ -137,7 +137,7 @@ mess.Renderer = function Renderer(env) {
});
group()();
},
function(err, results) {
function waitForDownloads(err, results) {
callback(err, m);
}
);
@ -156,7 +156,7 @@ mess.Renderer = function Renderer(env) {
style: function(m, callback) {
var that = this;
Step(
function() {
function loadStyles() {
var group = this.group();
m.Stylesheet.forEach(function(s) {
if (s.id) {
@ -168,7 +168,7 @@ mess.Renderer = function Renderer(env) {
}
});
},
function(e, results) {
function compileStyles(e, results) {
var options = {},
group = this.group();
for (var i = 0, l = results.length; i < l; i++) {
@ -193,7 +193,7 @@ mess.Renderer = function Renderer(env) {
});
}
},
function(err, res) {
function waitForCompilation(err, res) {
callback(err, m, res);
}
);