replace fromJSON from CanvasElement to Element