Skip to content

Instantly share code, notes, and snippets.

@timknip
Created May 22, 2012 14:30
Show Gist options
  • Save timknip/2769417 to your computer and use it in GitHub Desktop.
Save timknip/2769417 to your computer and use it in GitHub Desktop.
listen(this.view.getElement(), ['mousedown', 'touchstart'], function(e) {
var v = this.listenVertex_.get(goog.getUid(e.target));
if (v) {
dispatchEvent(this, new SelectionEvent(this, e, v));
} else {
var edge = this.listenEdge_.get(goog.getUid(e.target));
if (edge) {
dispatchEvent(this, new SelectionEvent(this, e, edge));
}
}
}.bind(this));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment