From 0ac51d1937486c8ba82214c7d2667331d3cb0434 Mon Sep 17 00:00:00 2001 From: Demonstrandum Date: Sat, 2 Mar 2019 18:34:03 +0000 Subject: [PATCH] Auto fill --- lib/BasicCanvas.js | 4 ++-- server.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/BasicCanvas.js b/lib/BasicCanvas.js index 0b2078b..2414514 100755 --- a/lib/BasicCanvas.js +++ b/lib/BasicCanvas.js @@ -1,4 +1,4 @@ -// Basic semi-related tools. +--// Basic semi-related tools. export const clone = obj => Object.assign(Object.create(Object.getPrototypeOf(obj)), obj); Object.prototype.clone = function () { return clone(this); @@ -626,8 +626,8 @@ class Canvas { }; this.context.beginPath(); _construction(this.shapes[_name].shape); - this.context.closePath(); this.shapes[_name].shape.fill(this.fill); + this.context.closePath(); return this.shapes[_name].shape; } diff --git a/server.sh b/server.sh index 3f2792e..0a3c6a6 100755 --- a/server.sh +++ b/server.sh @@ -1,3 +1,3 @@ #!/bin/sh echo "Go to: http://localhost:8000/example" -python3 -m http.server 8000 &> server.log +python3 -m http.server 8000