Comments (5)
Providing an example image from canva.cn, as follows
from moveable.
Although I'm all for this, I believe this a feature request versus an issue.
from moveable.
I needed this too, and I implemented it by simply creating a virtual clipped Div and swapping the target of the Moveable. It's a bit cumbersome, but it works.
from moveable.
I needed this too, and I implemented it by simply creating a virtual clipped Div and swapping the target of the Moveable. It's a bit cumbersome, but it works.
@bskang-v6x Bro, Could you show me some code plz. i want to know how your code work
from moveable.
I know this doesn't help the open source community, but I don't think I can release the code because it's being used for private purposes by a group larger than myself.
A simple solution is to use
- set "Image's Wrapper" as the Target for the Moveable, not "Image", and set the
- if it's "Clipable", add a ClipPath to the Wrapper, and when you're done clipping, change the Moveable's Target to the DOM with the size, coordinates, etc. that you added the ClipPath to the Wrapper.
- At this point, any Actions that are clipped will need to do some additional processing to the x, y, w, and h of the original Element in the Background.
- you'll need to define the appropriate Transform Matrix for each one, for example (let me know if there's a better way to do this).
I apologize for not being able to help you right away.
from moveable.
Related Issues (20)
- Bug: calling `trigger` for ables that are disabled causes a variety of issues
- Resize Breaks when target is updated HOT 1
- Bug: Is main in package.json incorrect?
- Scalable and resizable
- Bug: Resizable|Clippable|Scalable|Rotatable Options typings
- Is it possible to create custom clip masks ?
- Bug: beforeRenderStart event datas does not propagate to renderStart event datas
- Feature Request: Support `sharedDatas` among different able events
- Extend Clippable with wider draggable area
- [Questions] UI display in storybook
- Support for bounds in nested moveables
- Add more classNames or attributes to Clippable controls
- Moveable "picking up" item when clicking on combo box in popup menu in Safari.
- I want to resize an image to negative width/height and produce mirroring, is that possible?
- Control sizes HOT 1
- Drag is weird on draggable, clippable, rotatable.
- Rotated snap container
- line zooming in and out of svg causes drift
- How to handle Window Resize/ / Responsiveness ?
- The .moveable-control-box blue rectangle is misplaced in certain situations.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moveable.