Fix for #128 Added resize function to js api