Line positioning fixed
Canvas logic moved to directive