attach event listener to dom element not to document
added function redraw to the sigma core