Skip to content

Prevent editor.toSVG() from rendering the background grid in the SVG. #130

@panigrah

Description

@panigrah

Exporting the drawing as an SVG also generates paths for the background grid if the background style is set to grid. Can this be disabled somehow?

const editor = new Editor(canvas, {
    minZoom: 1,
    maxZoom: 20,
  });
  toolbar = makeEdgeToolbar(editor);
  editor.dispatch(
    editor.setBackgroundStyle({
      color: Color4.orange,
      type: BackgroundComponentBackgroundType.Grid,
      autoresize: true,
    }),
    false
  );
  
   //draw something into the editor
   editor.toSVG();

   //the resulting SVG also includes the grid.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions