File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 = {
You can’t perform that action at this time.
0 commit comments