update width of svg in realtime