diff --git a/src/part.js b/src/part.js index e434bae5f5b..cb273a8532c 100644 --- a/src/part.js +++ b/src/part.js @@ -162,10 +162,11 @@ Part.prototype.units = function(input) { /** Returns an object with shorthand access for pattern design */ Part.prototype.shorthand = function() { - let final = this.context.settings.mode === "draft" ? true : false; + let complete = this.context.settings.complete ? true : false; let paperless = this.context.settings.paperless === true ? true : false; + let sa = this.context.settings.complete ? this.context.settings.sa || 0 : 0; return { - sa: this.context.settings.sa || 0, + sa, measurements: this.context.settings.measurements || {}, options: this.context.options || {}, store: this.context.store, @@ -178,7 +179,7 @@ Part.prototype.shorthand = function() { Point: this.Point, Path: this.Path, Snippet: this.Snippet, - final, + complete, paperless, debug: this.debugClosure() }; diff --git a/src/pattern.js b/src/pattern.js index a4de07f2938..cc9513b81bb 100644 --- a/src/pattern.js +++ b/src/pattern.js @@ -21,7 +21,7 @@ export default function Pattern(config = false) { // Data containers this.settings = { - mode: "draft", + complete: true, idPrefix: "fs-", locale: "en", units: "metric", @@ -97,7 +97,7 @@ Pattern.prototype.sample = function() { Pattern.prototype.sampleParts = function() { let parts = {}; - this.settings.mode = "sample"; + this.settings.quick = true; this.settings.paperless = false; this.draft(); for (let i in this.parts) { diff --git a/tests/part.test.js b/tests/part.test.js index f543d01f321..2fed5ec7d62 100644 --- a/tests/part.test.js +++ b/tests/part.test.js @@ -108,7 +108,7 @@ it("Should return shorthand", () => { pattern.settings.paperless = true; let part = new pattern.Part(); let short = part.shorthand(); - expect(short.final).to.equal(true); + expect(short.complete).to.equal(true); expect(short.paperless).to.equal(true); }); diff --git a/tests/pattern.test.js b/tests/pattern.test.js index 3ec431c5db9..fcfc80dbeff 100644 --- a/tests/pattern.test.js +++ b/tests/pattern.test.js @@ -11,7 +11,7 @@ it("Pattern constructor should initialize object", () => { }); expect(pattern.width).to.equal(false); expect(pattern.height).to.equal(false); - expect(pattern.settings.mode).to.equal("draft"); + expect(pattern.settings.complete).to.equal(true); expect(pattern.parts).to.eql({}); expect(pattern.settings.units).to.equal("metric"); expect(pattern.config.foo).to.equal("bar");