Added flow button to html and js
Working on optimizing drawing for better performance