Replies: 5 comments 4 replies
-
@jfhenon, I was using the latest version of SVG Edit on master as of a week+ ago. In an effort to solve a problem I had, I updated to the latest on master as of today which includes a very large pull-request merge. From the pull-request, I understand this is what will become V7. I was able to use SVG Edit in an iframe (same origin) and interact with it using the embedded api. This no longer works. Is this a known issue in V7, or perhaps there's a migration step I missed? I switched from |
Beta Was this translation helpful? Give feedback.
-
You can think of what we're doing (we're not though) as a document manager. As I started to create this test, I quickly encountered an issue where our I was able to complete the test described above by directly hacking SVG Edit (ns thing.ui.svgeditor
(:require
["@acme/svgedit/dist/editor/embedapi.js" :default EmbeddedSVGEdit]))
(defn- call-when
[ready?-fn call-fn cb-fn]
(if (ready?-fn)
((call-fn) cb-fn)
(js/setTimeout #(call-when ready?-fn call-fn cb-fn) 100)))
(defn write
[data]
(when-let [svg-editor (.getElementById js/document "svgEditor")]
(let [ready?-fn #(when-let [frame (.-contentDocument svg-editor)]
(.getElementById frame "svgEditReady"))
write-fn #(.setSvgString (EmbeddedSVGEdit. svg-editor "*") data)]
(call-when ready?-fn write-fn #(pprint {:args %}))))) Our front-end application calls write with a fixed SVG string on This worked with v6, however I couldn't get SVG Edit to build. Using the most What have I missed? Thanks |
Beta Was this translation helpful? Give feedback.
-
@jfhenon I may have narrowed the problem down. I see the message I send is added to messageQueue and called when the extensions_added message is triggered here https://github.com/SVG-Edit/svgedit/blob/master/src/editor/svgedit.js#L835:
This invokes the call method on the svgCanvas object here https://github.com/SVG-Edit/svgedit/blob/master/src/svgcanvas/svgcanvas.js#L516:
However, ev is 'message', but events is an empty dict so undefined is returned. I don't see a call to bind 'message' to the svgCanvas object anywhere. Does this look like a bug, or did I not set this up correctly? I do see other events added, like saved, changed, and exported. FYI, I see two different values for namespace in embeddedapi.js. svg-edit is used here https://github.com/SVG-Edit/svgedit/blob/master/src/editor/embedapi.js#L70, and svgCanvas is used here https://github.com/SVG-Edit/svgedit/blob/master/src/editor/embedapi.js#L385. This is never reached because a message is never returned, but this seems suspicious to me |
Beta Was this translation helpful? Give feedback.
-
Hi, we are evaluating Svg-edit to be integrated in a large angular application. I have seen a lot of activity lately, can you provide a status update? Any guidance for Angular? I was able to get a basic version of the svgcanvas demo working fairly easily but have not made much progress understanding how best to work with the full UI. |
Beta Was this translation helpful? Give feedback.
-
Hello, we had to slow down a little recently but we are still working on making v7 released. We want to fix a number of remaining issues but we are close to our first goal. |
Beta Was this translation helpful? Give feedback.
-
Goals:
Please note that this preview is incomplete but all comments/contributions are welcome.
Beta Was this translation helpful? Give feedback.
All reactions