svg-pan-zoom 라이브러리 (https://github.com/ariutta/svg-pan-zoom)를 사용하며 Chrome과 Firefox 모두 내 사이트의 페이지에서 약 75 % 최신 버전).svg-pan-zoom이 작동하지 않습니다. 100 % 시간에
내 임기가 잘못되었다고 가정하기 때문에 오류가 발생했는지 또는 특정 시나리오가 원인인지 궁금합니다.
내 코드 :
(function (mw, $) {
$(document).ready(function() {
panZoomInstance = svgPanZoom('#stylometricanalysis-svg1', {
zoomEnabled: true,
controlIconsEnabled: true,
fit: true,
center: true,
minZoom: 0.1
});
panZoomInstance = svgPanZoom('#stylometricanalysis-svg2', {
zoomEnabled: true,
controlIconsEnabled: true,
fit: true,
center: true,
minZoom: 0.1
});
});
}(mediaWiki, jQuery));
오류 :
145 TypeError: this.options.svg.createSVGMatrix is not a function
라이브러리 버전 : 3.2.9
<object class='stylometricanalysis-image' id='stylometricanalysis-svg1' type='image/svg+xml' data='/some/path/to/svg/file.svg'>Your browser does not support SVG files, and so your visualization cannot display</object>
<object class='stylometricanalysis-image' id='stylometricanalysis-svg2' type='image/svg+xml' data='/some/path/to/svg/file.svg'>Your browser does not support SVG files, and so your visualization cannot display</object>