SSShooter / mind-elixir-core

⚗ Mind Elixir is a JavaScript, framework-agnostic mind map core.

Home Page:https://docs.mind-elixir.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

export as image

asith-w opened this issue · comments

Can the ' '@mind-elixir/export-image' package be used for exporting mind maps as image or svg in version 3.0 or 2.0?

could you provide any suggestions on how to modify this package in order to make it compatible with the latest version

commented

https://github.com/ssshooter/export-image/blob/157b254d6861e838441f38302ff874cbc6b7b669/painter/index.js#L17

  • traverse all node and use getBoundingClientRect to generate svg string or DOM
  • calculate map size then define the width and height of the svg file
  • integrate svg in the original map like link and summary to your svg file

great
thank you