- 👋 Hi, I’m @PUGE
- 👀 I’m interested in ...
- 🌱 I’m currently learning ...
- 💞️ I’m looking to collaborate on ...
- 📫 How to reach me ...
puge / deformation Goto Github PK
View Code? Open in Web Editor NEW创造一片可以 拖动 并且 可以随意改变大小 的区域
License: MIT License
创造一片可以 拖动 并且 可以随意改变大小 的区域
License: MIT License
试了下这个组件,从一个使用者的角度,希望功能可以再扩展下 (当然,也可能是我使用的姿势不对)
比如说我今天的需求:
我是在做一个编辑器时找到的这个组件,我的需求是只可以通过左右边界来改变宽度。
但是试过之后发现,这个需求需要 draggable=true resizable=true。
这样一来就产生了很多副作用,比如它是可以左右拖动(draggable),自由改变宽高的(resizable)
我简单粗暴的改了下组件代码,添加了对拖动(move: Boolean) 和改变大小(size: Stirng[x, y, both]) 的限制,实现了我想要的效果,供您参考。这里是 Demo
我个人觉得这些可以集成到draggable,resizable里,让使用者可以: 左右/上下/自由/禁止 地设置拖动和改变大小
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.