Better comments in ol.style.defaultStyleFunction

This commit is contained in:
Éric Lemoine
2014-08-26 17:10:07 +02:00
parent 89019ea233
commit 0d92d7abc1

View File

@@ -169,8 +169,11 @@ ol.style.defaultStyleFunction = function(feature, resolution) {
})
];
// now that we've run it the first time,
// replace the function with a constant version
// Now that we've run it the first time, replace the function with
// a constant version. We don't use an immediately-invoked function
// and a closure not to get an error at script evaluation time in
// browsers that do not support Canvas. ol.style.Circle indeed
// does canvas.getContext('2d') at construction time.
/**
* @param {ol.Feature} feature Feature.