editing elements and diagram