Implement drawDot() JS func