refactoring
This commit is contained in:
parent
9557b9a61f
commit
8dd819ddb2
@ -45,14 +45,14 @@
|
|||||||
|
|
||||||
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';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user