function downloadAsImg(name, imgType) {
    const gh = simulationArea.canvas.toDataURL(`image/${imgType}`);
    const anchor = document.createElement('a');
    anchor.href = gh;
    anchor.download = `${name}.${imgType}`;
    anchor.click();
}
Helper function to save canvas as image based on image type
@param {string} name -name of the circuit
@param {string} imgType - image type ex: png,jpg etc.
@category data