index.js
function resize() { 
			console.log("resizing base");
			base.width = parent.clientWidth;
			svg.setAttributeNS(null, "width", base.width);

			// only resize the height if aspect was specified instead of height
			if (opts.aspect) {
			    base.height = base.width * opts.aspect;
				svg.setAttributeNS(null, "height", base.height);
			}

		    base.scale = base.width / base.original_width;

			// optional callback
			if (opts.onResize) {
				opts.onResize(base.width, base.height, base.scale);
			}
		}
function resize() { 
			console.log("resizing base");
			base.width = parent.clientWidth;
			svg.setAttributeNS(null, "width", base.width);

			// only resize the height if aspect was specified instead of height
			if (opts.aspect) {
			    base.height = base.width * opts.aspect;
				svg.setAttributeNS(null, "height", base.height);
			}

		    base.scale = base.width / base.original_width;

			// optional callback
			if (opts.onResize) {
				opts.onResize(base.width, base.height, base.scale);
			}
		}
function resize ( ) { console . log ( "resizing base" ) ; base . width = parent . clientWidth ; svg . setAttributeNS ( null , "width" , base . width ) ; // only resize the height if aspect was specified instead of height if ( opts . aspect ) { base . height = base . width * opts . aspect ; svg . setAttributeNS ( null , "height" , base . height ) ; } base . scale = base . width / base . original_width ; // optional callback if ( opts . onResize ) { opts . onResize ( base . width , base . height , base . scale ) ; } }
function called when the window resizes
function called when the window resizes