dev/server/public/admin/vendor/svg-edit-2.7/svg-editor - Copy.js
function(width, height) {
									var newImage = svgCanvas.addSvgElementFromJson({
										element: 'image',
										attr: {
											x: 0,
											y: 0,
											width: width,
											height: height,
											id: svgCanvas.getNextId(),
											style: 'pointer-events:inherit'
										}
									});
									svgCanvas.setHref(newImage, e.target.result);
									svgCanvas.selectOnly([newImage]);
									svgCanvas.alignSelectedElements('m', 'page');
									svgCanvas.alignSelectedElements('c', 'page');
									updateContextPanel();
								}
function(width, height) {
									var newImage = svgCanvas.addSvgElementFromJson({
										element: 'image',
										attr: {
											x: 0,
											y: 0,
											width: width,
											height: height,
											id: svgCanvas.getNextId(),
											style: 'pointer-events:inherit'
										}
									});
									svgCanvas.setHref(newImage, e.target.result);
									svgCanvas.selectOnly([newImage]);
									svgCanvas.alignSelectedElements('m', 'page');
									svgCanvas.alignSelectedElements('c', 'page');
									updateContextPanel();
								}
function ( width , height ) { var newImage = svgCanvas . addSvgElementFromJson ( { element : 'image' , attr : { x : 0 , y : 0 , width : width , height : height , id : svgCanvas . getNextId ( ) , style : 'pointer-events:inherit' } } ) ; svgCanvas . setHref ( newImage , e . target . result ) ; svgCanvas . selectOnly ( [ newImage ] ) ; svgCanvas . alignSelectedElements ( 'm' , 'page' ) ; svgCanvas . alignSelectedElements ( 'c' , 'page' ) ; updateContextPanel ( ) ; }
let's insert the new image until we know its dimensions
let s insert the new image until we know its dimensions