Skip to content
Snippets Groups Projects
Commit 5ecf9245 authored by stuebinm's avatar stuebinm
Browse files

mutate the svg in-place

this changes the update() function to mutate the svg in-place instead of
re-serialising and then letting the browser re-parse it each time, which
avoids (a) having to copy the entire svg object (including the font blob
as string) and (b) having to first serialise and then parse it
again (also including the blob).

The result is text editing with no discernable delay while typing.

This does mean that the svg is now embedded directly and may e.g. share
its id namespace, though that doesn't appear to be a problem with the
current template and also shouldn't be a problem in general as long as
the svg itself isn't user-generated.
parent 0119861d
No related branches found
No related tags found
1 merge request!1mutate the svg in-place
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment