update localStorage[id] when draw method is called