1
의 크기를 조절 자동 확장 :창에 SVG는이 코드가
function myClient() {
if (!(this instanceof arguments.callee)) {
return new arguments.callee(arguments);
}
var self = this;
this.init = function() {
self.viewResized();
self.drawSvg();
};
this.viewResized = function() {
var width = $('body').width(),
windowHeight = $(window).height(),
svgCanvasHeight = width * (369.0/567.0);
$('#svg').css({
'margin-top': 10
});
}
this.drawSvg = function() {
// ...
}
var myClient;
jQuery(function() {
myClient = new myClient();
$(window).resize(function() {
console.log("window resized");
myClient.viewResized();
});
});
가 어떻게 drawSvg에 svgCanvasHeight을받을 수 있나요을 동적으로 SVG의 뷰 박스와 SVG 창 크기를 조정할 때, 그렇게 너무?