()
| 438 | } |
| 439 | |
| 440 | newPath(){ |
| 441 | const names = this.store.getPathNames(); |
| 442 | const name = this.store.nextPathName; |
| 443 | names.push( name ); |
| 444 | |
| 445 | this.nameCtrl = this.nameCtrl.options( names ); |
| 446 | this.nameCtrl.onChange( ( value ) => { |
| 447 | this.loadPath( value ); |
| 448 | }); |
| 449 | |
| 450 | this.config.yAxis = 0.5; |
| 451 | this.config.xAxis = 0.5; |
| 452 | this.config.xMax = 2; |
| 453 | this.config.snap = false; |
| 454 | this.config.name = name; |
| 455 | this.config.tool = 'select'; |
| 456 | this.config.depth = 0.2; |
| 457 | |
| 458 | this.gui.controllers.forEach( controller => controller.updateDisplay() ); |
| 459 | //this.nameCtrl.updateDisplay(); |
| 460 | |
| 461 | this.activeNode = null; |
| 462 | this.nodes = []; |
| 463 | |
| 464 | this.activePath = name; |
| 465 | |
| 466 | this.render(true); |
| 467 | this.updatePathNamesGUI(); |
| 468 | } |
| 469 | |
| 470 | copyPath(){ |
| 471 | const name = this.store.copy(); |
no test coverage detected