I found the answer here , although I think this is not the best answer.
Basically, you set the mask display property to none with the following code
maskelement.attr("display", "none");
Although SVG looks like a mask, it really does not remove the mask. I think there is a better answer.
source
share