MCPcopy Create free account
hub / github.com/facebook/Rapid / _addDrawNode

Method _addDrawNode

modules/modes/DrawLineMode.js:697–711  ·  view source on GitHub ↗

* _addDrawNode

(loc)

Source from the content-addressed store, hash-verified

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 /**

Callers 5

enterMethod · 0.95
_moveMethod · 0.95
_clickMethod · 0.95
_clickLocMethod · 0.95
_clickWayMethod · 0.95

Calls 5

osmNodeFunction · 0.90
actionAddEntityFunction · 0.90
actionAddVertexFunction · 0.90
mouseLocMethod · 0.80
performMethod · 0.80

Tested by

no test coverage detected