implemented refreshing canvas whenever modify properties.