Fixed bug where draw callback would never be fired

createPolygon checked for the existence of the callback, but used a local variable rather than a class variable.