GithubHelp home page GithubHelp logo

ForeignObject Support about subjx HOT 5 CLOSED

nichollascarter avatar nichollascarter commented on May 29, 2024
ForeignObject Support

from subjx.

Comments (5)

nichollascarter avatar nichollascarter commented on May 29, 2024 1

@abdulmanan0315 , please check this example .

Is this close to your expectations about foreign object support?

from subjx.

MR-AMDEV avatar MR-AMDEV commented on May 29, 2024 1

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.

Screenshot (5)

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.

nichollascarter avatar nichollascarter commented on May 29, 2024

hi @abdulmanan0315

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.

nichollascarter avatar nichollascarter commented on May 29, 2024

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.

6VX0H2N5C3

from subjx.

MR-AMDEV avatar MR-AMDEV commented on May 29, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.