Updated AbstractDrawElement, onVar can handle empty array conditions