Language: JavaScript
Label: vulnerable
CWE: CWE-400 \u2014 Uncontrolled Resource Consumption
The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources.

Code:
mxEvent.getSource(f)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(f){this.reset()}));var a=this.graph.click;this.graph.click=mxUtils.bind(this,function(f){a.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(f.getEvent())||this.graph.model.isVertex(f.getCell())||this.reset()});var c=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(f,
e){c=!1;f=e.getEvent();this.isResetEvent(f)?this.reset():this.isActive()||(e=this.getState(e.getState()),null==e&&mxEvent.isTouchEvent(f)||this.update(e));this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(f,e){f=e.getEvent();this.isResetEvent(f)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(f)||this.update(this.getState(e.getState()),e.getGraphX(),e.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(c=!0)}),mouseUp:mxUtils.bind(this,