lvhuaisheng / leafer-x-ruler Goto Github PK
View Code? Open in Web Editor NEWleafer-ui的标尺线插件
Home Page: http://leafer-x-ruler.sourcenet.cc/
License: MIT License
leafer-ui的标尺线插件
Home Page: http://leafer-x-ruler.sourcenet.cc/
License: MIT License
通过缩放浏览器窗口来改变画布大小
使用了这个代码的,但是还是得在画布上点击一下才会更新标尺。
useResizeObserver(divRef, (entries) => {
const [entry] = entries
const { width, height } = entry.contentRect
// 这步是为了触发leafer-ui的resize事件,标尺在监听到resize事件后会重新渲染
leafer.app.resize({ width, height })
})
演示站是好的,但是我抄的演示这块的代码缩放画布尺子不动。
不知道这个代码跟演示站是否一致呢?
https://github.com/LvHuaiSheng/leafer-x-ruler/blob/master/playground/src/App.vue
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.