-
-
Couldn't load subscription status.
- Fork 378
Breaking Change
DJJo edited this page Jul 25, 2025
·
11 revisions
Data should be passed to init(), not options.
import MindElixir, { E } from 'mind-elixir'
import example from 'mind-elixir/dist/example1'
let mind = new MindElixir(options)
mind.install(plugin) // install your plugin
// create new map data
const data = MindElixir.new('new topic')
// or `example`
// or the data return from `.getAllData()`
mind.init(data) // <--- HERERemove Node menu from mind-elixir-core.
Remove updateNodeTags, updateNodeIcons, updateNodeHyperLink. Use updateNodeStyle instead.
Options changes:
primaryLinkStyle => mainLinkStyle
primaryNodeVerticalGap => mainNodeVerticalGap
primaryNodeHorizontalGap => mainNodeHorizontalGap
Rename custom tags:
-
grp->me-wrapper -
t->me-parent -
children->me-children -
tpc->me-tpc - etc.
Rename methods:
-
getAllData->getData
Options removed:
mainNodeVerticalGap: 15, // default 25
mainNodeHorizontalGap: 15, // default 65
Instead, you can just adjust css style of .map-container me-main > me-wrapper.
Use MindElixir.E instead of import { E } from 'mind-elixir'
Data Migration:
db.maps.find({}).forEach((doc) => {
if (doc.content.linkData) {
doc.content.arrows = []
for (let key in doc.content.linkData) {
const item = doc.content.linkData[key]
doc.content.arrows.push(item)
}
delete doc.content.linkData
db.maps.updateOne({ _id: doc._id }, { $set: { content: doc.content } })
}
})API updates:
- Move scroll-based movement to transition-based movement
-
Summary.text->Summary.label - Remove
getDataMd() - MindElixir.dragMoveHelper -> instance.dragMoveHelper
- Remove
unselectNode() - Remove
selectNodeevent, useselectNodesevent instead - Remove
removeNode() -
node.style.fontSize: use string instead of number which means you should addpxto the end - Use
instance.findElinstead ofMindElixir.Eto get a node element - CSS file is separated from JS file, you need to import it manually
- If using a bundler with CSS support:
import "mind-elixir/style.css"; - If using a CDN you can add to your CSS file:
@import "https://cdn.jsdelivr.net/npm/mind-elixir@^5.0.0/dist/style.css";
- If using a bundler with CSS support: