Comments (5)
@abdulmanan0315 , please check this example .
Is this close to your expectations about foreign object support?
from subjx.
Thanks man for this support. Its working fine but there seems to be some bugs about that:
The width and height of the rect and the foreign object doesn't seems to fit in the svg-wrapper.
It fits only when we resize the object to left.
But isn't there any support for the foreignObject element directly? Like instead of creating a g and then creating inside of that foreignobject and a rect to aid?
from subjx.
I've implemented foreign objects support since 0.3.1 version.
If you're using lower version migration will be too painful. Please test it before updating version.
I will test your example with latest version and let you to know about the result.
Thanks.
from subjx.
I've just tested on foreignObject element directly. It seems to work properly or I missed something.
Please approve(provide test sandbox) if it does not work as you wish.
from subjx.
Its working man. Thanks for that gif image.
Actually i was using the following code and it was not working.
<g id=" + uuid + " data-original-id=" + id + " type="animated_object" x="100" y="100" class="drag-svg"> +
<foreignObject x="100" y="100" width="200" height="200"> +
<body xmlns="http://www.w3.org/1999/xhtml"> +
<video xmlns="http://www.w3.org/1999/xhtml" src="/Case study VP9.webm#t=0.1" width="100%" height="100%"></video> +
</body> +
</foreignObject> +
<rect x="100" y="100" width="200" height="200" fill="red" fill-opacity="0"></rect> +
</g>;
Actually i was wrapping the foreignObject inside a g element and thats why it wasn't working.
Thanks man. !!!
from subjx.
Related Issues (20)
- Resize components HOT 4
- Limit drag, resize, etc to an element. HOT 1
- Multiple sjx-wrapper's HOT 2
- Rotating to 90deg disables rotating and resizing HOT 9
- mimic move for new elements HOT 2
- How to rotate, resize and drag multiple dom elements? HOT 2
- Double click to disable HOT 2
- rotationPoint option HOT 6
- resetCenterPoint(); inside onDrop event does not work on 0.3.9 HOT 3
- Only one is required. HOT 2
- When the container is scaled, it cannot drag properly HOT 1
- Great product, feature request - skew HOT 3
- Just a suggestion
- How can i destroy an created instance HOT 1
- setTransformOrigin && exeRotate HOT 6
- Drag and Drop dynamically is not working HOT 2
- Can we add new div while first time onMove() method? HOT 1
- How can we update the xDraggables once I have applied some offset left and top stylings to the parent element?
- simple demo
- Prevent event bubbled on Rotate \ Resize element
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 subjx.