VUE对svg图形拖动和缩放及卡顿的性能优化

使用的是

panzoom

npm install panzoom --save

// In the browser panzoom is already on the
// window. If you are in common.js world, then 
 var panzoom = require('panzoom')

// grab the DOM SVG element that you want to be draggable/zoomable:
var element = document.getElementById('scene')

// and forward it it to panzoom.
panzoom(element)

github:https://github.com/anvaka/panzoom

参考:https://blog.csdn.net/a843334549/article/details/123296950

猜你喜欢

转载自blog.csdn.net/shileimohan/article/details/129280746