Skip to content

Breaking Change

DJJo edited this page Jan 13, 2024 · 10 revisions

1.0.0

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) // <--- HERE

2.0.0

Remove 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

3.0.0

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'

4.0.0

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:

Clone this wiki locally