refactoring

This commit is contained in:
darul 2014-01-14 21:08:40 +01:00
parent 9557b9a61f
commit 8dd819ddb2

View File

@ -46,13 +46,13 @@
planet.onDraw(function() { planet.onDraw(function() {
planet.withSavedContext(function(context) { planet.withSavedContext(function(context) {
context.beginPath(); context.beginPath();
// nice land shadow planet.path.context(context)(land);
if (config.shadow) { if (config.shadow) {
context.shadowOffsetX = config.shadow.shadowOffsetX || 1; context.shadowOffsetX = config.shadow.shadowOffsetX || 1;
context.shadowOffsetY = config.shadow.shadowOffsetY || 1; context.shadowOffsetY = config.shadow.shadowOffsetY || 1;
context.shadowColor = config.shadow.shadowColor || 'white'; context.shadowColor = config.shadow.shadowColor || 'white';
} }
planet.path.context(context)(land);
if (config.fill !== false) { if (config.fill !== false) {
context.fillStyle = config.fill || 'white'; context.fillStyle = config.fill || 'white';