Skip to content

Commit

Permalink
fix(hdom-canvas): fix attrib default vals, add missing weight val
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Aug 9, 2019
1 parent 03d5932 commit f09677f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/hdom-canvas/src/index.ts
Expand Up @@ -33,7 +33,7 @@ const DEFAULTS: any = {
align: "left",
alpha: 1,
baseline: "alphabetic",
comp: "source-over",
compose: "source-over",
dash: [],
dashOffset: 0,
direction: "inherit",
Expand All @@ -48,7 +48,8 @@ const DEFAULTS: any = {
shadowX: 0,
shadowY: 0,
smooth: true,
stroke: "#000"
stroke: "#000",
weight: 1
};

const CTX_ATTRIBS: IObjectOf<string> = {
Expand Down Expand Up @@ -385,7 +386,7 @@ const restoreState = (
}
const edits = curr.edits;
if (edits) {
for (let attribs = prev.attribs, i = edits.length - 1; i >= 0; i--) {
for (let attribs = prev.attribs, i = edits.length; --i >= 0; ) {
const id = edits[i];
const v = attribs[id];
setAttrib(
Expand Down

0 comments on commit f09677f

Please sign in to comment.