Código :
<html>
<head>
<script src="fabric.js"></script>
</head>
<body>
<canvas id="c" width="800" height="450" style="border:1px solid #000000"></canvas>
<div style="display: inline-block; width: 140px">
<select id="ancho">
<option>106</option>
<option>150</option>
<option>200</option>
</select>
<button id="Ancho">Ancho</button>
</div>
<script>
var canvas = this.__canvas = new fabric.Canvas('c', { selection: false });
fabric.Object.prototype.originX = fabric.Object.prototype.originY = 'center';
fabric.Image.fromURL('ventana.svg', function(vent) {
vent.scale(2);
vent.setLeft(380);
vent.setTop(200);
canvas.add(vent);
});
var selectancho = document.getElementById('ancho').value;
var AnchoBtn = document.getElementById('Ancho');
AnchoBtn.onclick = function() {
selectancho = document.getElementById('ancho').value;
vent.set('width', selectancho);
canvas.renderAll();
};
</script>
</body>
</html> 