* _addDrawNode
(loc)
| 695 | * _addDrawNode |
| 696 | */ |
| 697 | _addDrawNode(loc) { |
| 698 | const context = this.context; |
| 699 | const editor = context.systems.editor; |
| 700 | const map = context.systems.map; |
| 701 | |
| 702 | const drawNode = osmNode({ loc: loc ?? map.mouseLoc() }); |
| 703 | this.drawNodeID = drawNode.id; |
| 704 | |
| 705 | editor.perform( |
| 706 | actionAddEntity(drawNode), // Create new draw node |
| 707 | actionAddVertex(this.drawWayID, drawNode.id, this._insertIndex) // Add new draw node to draw way |
| 708 | ); |
| 709 | |
| 710 | return drawNode; |
| 711 | } |
| 712 | |
| 713 | |
| 714 | /** |
no test coverage detected