diff --git a/index.html b/index.html index 3d5a2b3..4fc17cf 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,7 @@ - + Pixel Editor diff --git a/public/favicon.png b/public/favicon.png new file mode 100644 index 0000000..600d3d6 Binary files /dev/null and b/public/favicon.png differ diff --git a/src/components/uiControls/bottom/SaveButton.ts b/src/components/uiControls/bottom/SaveButton.ts index 8671b02..dfbea44 100644 --- a/src/components/uiControls/bottom/SaveButton.ts +++ b/src/components/uiControls/bottom/SaveButton.ts @@ -18,7 +18,10 @@ class SaveButton implements UIComponent { ); } save() { - let canvas = elt("canvas"); + let canvas = elt("canvas", { + width: this.picture.width, + height: this.picture.height, + }); drawPicture(this.picture, canvas, 1); let link = elt("a", { href: canvas.toDataURL(), diff --git a/src/models/reducer.ts b/src/models/reducer.ts index 986b65d..4b8fb09 100644 --- a/src/models/reducer.ts +++ b/src/models/reducer.ts @@ -25,6 +25,7 @@ export function reducer(state: EditorState, action: ActionObj) { doneAt: Date.now(), }); } else if (action.type == "select-color") { + // console.log("select color", action); const newColor = action.payload!.color; return Object.assign({}, state, { color: newColor,