Skip to content

Commit 2e3605d

Browse files
committed
Minor code refinement
1 parent 8f97921 commit 2e3605d

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/Toolpath.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -566,8 +566,8 @@ class Toolpath {
566566
// @param {function} [options.addArcCurve]
567567
constructor(options) {
568568
const {
569-
modal,
570569
position,
570+
modal,
571571
addLine = noop,
572572
addArcCurve = noop
573573
} = { ...options };
@@ -590,17 +590,17 @@ class Toolpath {
590590

591591
this.fn = { addLine, addArcCurve };
592592

593-
const interpreter = new Interpreter({ handlers: this.handlers });
594-
interpreter.setPosition = (...pos) => {
593+
const toolpath = new Interpreter({ handlers: this.handlers });
594+
toolpath.getPosition = () => ({ ...this.position });
595+
toolpath.getModal = () => ({ ...this.modal });
596+
toolpath.setPosition = (...pos) => {
595597
return this.setPosition(...pos);
596598
};
597-
interpreter.getPosition = () => ({ ...this.position });
598-
interpreter.setModal = (modal) => {
599+
toolpath.setModal = (modal) => {
599600
return this.setModal(modal);
600601
};
601-
interpreter.getModal = () => ({ ...this.modal });
602602

603-
return interpreter;
603+
return toolpath;
604604
}
605605
setModal(modal) {
606606
this.modal = {

0 commit comments

Comments
 (0)