How to make rubber raphael js? to scale it?

var rsr = Raphael('coop1', '1024', '768'); 
var floors = [] ;
var path_a = rsr.path("M 478.7 795.7 106.3 178.3 of CC L L L 243.3 894 894 795 316 351.7 L L L 478.7 478.7 335.3 178.3 of CC"); path_a.attr({opacity: '0.57',fill: '#51B3B8',stroke: '#000000',"stroke-miterlimit": '10','stroke-width': '0','stroke-opacity': '1'}).data('id', 'path_a'); floors.push(path_a);
var path_b = rsr.path("M 478.7 335.3 L 795 316 894 351.7 L L 892.3 794.3 502.3 446.7 L L L 478.7 478.7 473.7 335.3"); path_b.attr({opacity: '0.43',fill: '#5BAE62',stroke: '#000000',"stroke-miterlimit": '10','stroke-width': '0','stroke-opacity': '1'}).data('id', 'path_b'); floors.push(path_b);
var path_c = rsr.path("M 478.7 473.7 L 794.3 502.3 446.7 L L 892.3 892.3 546.7 L 793.3 691.3 761.3 L 684 L 760.9 681.3 L 587.9 639 584 640.1 L L L 561.5 561.6 635 633.3 L 611 L 478.7 478.7 473.7"); path_c.attr({opacity: '0.53',fill: '#C583B6',stroke: '#000000',"stroke-miterlimit": '10','stroke-width': '0','stroke-opacity': '1'}).data('id', 'path_c');floors.push(path_c); 
var path_d = rsr.path("M 377.3 378 202 L 341.3 349.3 L L 235.7 236.3 245 304 L 304 L 302 L 262.3 261.7 298.3 298 267 L L L 267.3 301.3 302 302 262 296.3 L L L 245 245 252 304 L 304 L 236.3 236.3 236.3 L 377.3 202"); path_d.attr({opacity: '0.52',fill: '#6E8E8A',stroke: '#000000',"stroke-miterlimit": '10','stroke-width': '0','stroke-opacity': '1'}).data('id', 'path_d'); floors.push(path_d);
var path_e = rsr.path("M 378 378 464.3 341.3 L L L 451.7 235.7 235.7 245.3 406 406.8 L L L 405.9 262.9 262.7 404 L 404 L 267.7 267.7 406.3 L 282 281.7 403 406 L L L 286.3 286.7 403 406 405 L 302 L 302 L 351.7 353.7 245.7 L 406 L 245.3 235.7 235.7 406.8 L L 341.3 349.3 378"); path_e.attr({opacity: '0.52',fill: '#6E8E8A',stroke: '#000000',"stroke-miterlimit": '10','stroke-width': '0','stroke-opacity': '1'}).data('id', 'path_e'); floors.push(path_e);
var path_f = rsr.path("M 464.3 L 378 378 587.3 L 320.5 314.8 574.8 574 L L L 302.8 303.3 572.2 570 554 L L 235.7 235.7 508 246 L 504 L 279.2 279.7 495.7 498.8 L L 284.7 284.8 498.2 495.7 L L L 302.7 495 302 452.6 457.6 L 246 L 246 504 508 L L 235.7 235.7 451.7 L 378 464.3"); path_f.attr({opacity: '0.52',fill: '#6E8E8A',stroke: '#000000',"stroke-miterlimit": '10','stroke-width': '0','stroke-opacity': '1'}).data('id', 'path_f'); floors.push(path_f);
 for (var i = 0; i < floors.length; i++) {



 // Showing off
floors[i].mouseover(function(e){
 this.node.style.opacity = 0.7;
 this.node.style.cursor = 'pointer';



});



floors[i].mouseout(function(e){
 this.node.style.opacity = 0.3;

});
}


Let's say I changed the div sizes coop1 ,reduced its scale. But SVG remained, how to make SVG scaled too?
September 26th 19 at 11:28
2 answers
September 26th 19 at 11:30
Solution
element.setViewBox(0, 0, width, height );
insert immediately after var element = Raphael('div', 'width', 'height');
and change the values.
the first value (0) - shift left/right
the second value(0) - shifts up/down
well, width and height
September 26th 19 at 11:32
where in the code to insert?tried - Dexter_Windler commented on September 26th 19 at 11:35

Find more questions by tags Raphaël