re-render graphics only when elements are modified

require to modify some element code to trigger re-rendering