mind-elixir 3.2.1 → 3.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/MindElixir.iife.js +8 -8
- package/dist/MindElixir.js +797 -785
- package/dist/MindElixirLite.iife.js +3 -3
- package/dist/MindElixirLite.js +62 -54
- package/dist/types/customLink.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/methods.d.ts +1 -0
- package/package.json +1 -1
- package/readme.md +8 -11
package/dist/MindElixirLite.js
CHANGED
|
@@ -130,7 +130,7 @@ function Tt(e) {
|
|
|
130
130
|
N.clear();
|
|
131
131
|
return;
|
|
132
132
|
}
|
|
133
|
-
e.unselectNode(), e.unselectNodes(), e.unselectSummary();
|
|
133
|
+
e.unselectNode(), e.unselectNodes(), e.unselectSummary(), e.unselectLink();
|
|
134
134
|
const n = t.target;
|
|
135
135
|
if (n.tagName === "ME-EPD")
|
|
136
136
|
e.expandNode(n.previousSibling);
|
|
@@ -215,7 +215,12 @@ const Nt = {
|
|
|
215
215
|
n.appendChild(o);
|
|
216
216
|
}
|
|
217
217
|
return n;
|
|
218
|
-
}, E = document, C = (e, t) =>
|
|
218
|
+
}, E = document, C = (e, t) => {
|
|
219
|
+
const s = (t ? t.mindElixirBox : E).querySelector(`[data-nodeid=me${e}]`);
|
|
220
|
+
if (!s)
|
|
221
|
+
throw new Error(`FindEle: Node ${e} not found, maybe it's collapsed.`);
|
|
222
|
+
return s;
|
|
223
|
+
}, bt = function(e, t) {
|
|
219
224
|
if (e.textContent = t.topic, t.style && (e.style.color = t.style.color || "", e.style.background = t.style.background || "", e.style.fontSize = t.style.fontSize + "px", e.style.fontWeight = t.style.fontWeight || "normal"), t.image) {
|
|
220
225
|
const n = t.image;
|
|
221
226
|
if (n.url && n.width && n.height) {
|
|
@@ -1120,8 +1125,10 @@ const Ne = function(e, t, n, s) {
|
|
|
1120
1125
|
const t = e.linkObj, n = C(t.from), s = C(t.to), i = K(this, n, t.delta1), o = K(this, s, t.delta2);
|
|
1121
1126
|
this.showLinkController(t, i, o);
|
|
1122
1127
|
}, ze = function() {
|
|
1128
|
+
this.currentLink = null, this.hideLinkController();
|
|
1129
|
+
}, Be = function() {
|
|
1123
1130
|
this.linkController.style.display = "none", this.P2.style.display = "none", this.P3.style.display = "none";
|
|
1124
|
-
},
|
|
1131
|
+
}, Oe = function(e, t, n) {
|
|
1125
1132
|
this.linkController.style.display = "initial", this.P2.style.display = "initial", this.P3.style.display = "initial", this.nodes.appendChild(this.linkController), this.nodes.appendChild(this.P2), this.nodes.appendChild(this.P3);
|
|
1126
1133
|
let { x: s, y: i } = O(t), { ctrlX: o, ctrlY: r } = t, { ctrlX: l, ctrlY: c } = n, { x: u, y: h } = O(n);
|
|
1127
1134
|
this.P2.style.cssText = `top:${r}px;left:${o}px;`, this.P3.style.cssText = `top:${c}px;left:${l}px;`, b(this.line1, {
|
|
@@ -1166,7 +1173,7 @@ const Ne = function(e, t, n, s) {
|
|
|
1166
1173
|
}), e.delta2.x = l - n.cx, e.delta2.y = c - n.cy;
|
|
1167
1174
|
});
|
|
1168
1175
|
};
|
|
1169
|
-
function
|
|
1176
|
+
function qe() {
|
|
1170
1177
|
this.linkSvgGroup.innerHTML = "";
|
|
1171
1178
|
for (const e in this.linkData) {
|
|
1172
1179
|
const t = this.linkData[e];
|
|
@@ -1174,7 +1181,7 @@ function Oe() {
|
|
|
1174
1181
|
}
|
|
1175
1182
|
this.nodes.appendChild(this.linkSvgGroup);
|
|
1176
1183
|
}
|
|
1177
|
-
function
|
|
1184
|
+
function Ve(e) {
|
|
1178
1185
|
if (console.time("editSummary"), !e)
|
|
1179
1186
|
return;
|
|
1180
1187
|
const t = e.children[2];
|
|
@@ -1184,17 +1191,18 @@ function qe(e) {
|
|
|
1184
1191
|
i === "" ? s.label = origin : s.label = i, n.remove(), i !== origin && (t.innerHTML = s.label, this.linkDiv());
|
|
1185
1192
|
}), console.timeEnd("editSummary");
|
|
1186
1193
|
}
|
|
1187
|
-
const
|
|
1194
|
+
const Re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1188
1195
|
__proto__: null,
|
|
1189
1196
|
createLink: De,
|
|
1190
1197
|
drawCustomLink: Ae,
|
|
1191
|
-
editCutsomLinkLabel:
|
|
1192
|
-
hideLinkController:
|
|
1198
|
+
editCutsomLinkLabel: Ve,
|
|
1199
|
+
hideLinkController: Be,
|
|
1193
1200
|
removeLink: He,
|
|
1194
|
-
renderCustomLink:
|
|
1201
|
+
renderCustomLink: qe,
|
|
1195
1202
|
selectLink: Pe,
|
|
1196
|
-
showLinkController:
|
|
1197
|
-
|
|
1203
|
+
showLinkController: Oe,
|
|
1204
|
+
unselectLink: ze
|
|
1205
|
+
}, Symbol.toStringTag, { value: "Module" })), je = function(e) {
|
|
1198
1206
|
var c, u;
|
|
1199
1207
|
if (e.length === 0)
|
|
1200
1208
|
throw new Error("No selected node.");
|
|
@@ -1237,7 +1245,7 @@ const Ve = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1237
1245
|
start: o,
|
|
1238
1246
|
end: r
|
|
1239
1247
|
};
|
|
1240
|
-
},
|
|
1248
|
+
}, We = function(e) {
|
|
1241
1249
|
const t = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
1242
1250
|
return t.setAttribute("id", e), t;
|
|
1243
1251
|
}, ft = function(e, t) {
|
|
@@ -1257,37 +1265,37 @@ const Ve = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1257
1265
|
y: n + "",
|
|
1258
1266
|
fill: i || "#666"
|
|
1259
1267
|
}), o.innerHTML = e, o;
|
|
1260
|
-
},
|
|
1268
|
+
}, Xe = (e) => C(e).parentElement.parentElement, Ye = function({ parent: e, start: t }) {
|
|
1261
1269
|
var o, r;
|
|
1262
1270
|
const n = C(e), s = n.nodeObj;
|
|
1263
1271
|
let i;
|
|
1264
1272
|
return s.root === !0 ? i = (o = C(s.children[t].id).closest("me-main")) == null ? void 0 : o.className : i = (r = n.closest("me-main")) == null ? void 0 : r.className, i;
|
|
1265
1273
|
}, kt = function(e, t) {
|
|
1266
1274
|
var X;
|
|
1267
|
-
const { id: n, text: s, parent: i, start: o, end: r } = t, l = e.nodes, u = C(i).nodeObj, h =
|
|
1275
|
+
const { id: n, text: s, parent: i, start: o, end: r } = t, l = e.nodes, u = C(i).nodeObj, h = Ye(t);
|
|
1268
1276
|
let d = 1 / 0, a = 0, f = 0, g = 0;
|
|
1269
1277
|
for (let R = o; R <= r; R++) {
|
|
1270
1278
|
const nt = (X = u.children) == null ? void 0 : X[R];
|
|
1271
1279
|
if (!nt)
|
|
1272
1280
|
return console.warn("Child not found"), e.removeSummary(n), null;
|
|
1273
|
-
const Y =
|
|
1281
|
+
const Y = Xe(nt.id), { offsetLeft: F, offsetTop: st } = V(l, Y);
|
|
1274
1282
|
R === o && (f = st), R === r && (g = st + Y.offsetHeight), F < d && (d = F), Y.offsetWidth + F > a && (a = Y.offsetWidth + F);
|
|
1275
1283
|
}
|
|
1276
1284
|
let m, p;
|
|
1277
1285
|
const v = f + 10, x = g + 10, w = (v + x) / 2, _ = e.theme.cssVar["--color"];
|
|
1278
1286
|
h === "lhs" ? (m = ft(`M ${d + 10} ${v} c -5 0 -10 5 -10 10 L ${d} ${x - 10} c 0 5 5 10 10 10 M ${d} ${w} h -10`, _), p = pt(s, d - 20, w + 6, "end", _)) : (m = ft(`M ${a - 10} ${v} c 5 0 10 5 10 10 L ${a} ${x - 10} c 0 5 -5 10 -10 10 M ${a} ${w} h 10`, _), p = pt(s, a + 20, w + 6, "start", _));
|
|
1279
|
-
const k =
|
|
1287
|
+
const k = We("s-" + n);
|
|
1280
1288
|
return k.appendChild(m), k.appendChild(p), k.summaryObj = t, e.summarySvg.appendChild(k), k;
|
|
1281
|
-
},
|
|
1289
|
+
}, Fe = function() {
|
|
1282
1290
|
let e = [];
|
|
1283
1291
|
this.currentNode ? e = [this.currentNode] : this.currentNodes && (e = this.currentNodes);
|
|
1284
|
-
const { parent: t, start: n, end: s } =
|
|
1292
|
+
const { parent: t, start: n, end: s } = je(e), i = { id: et(), parent: t, start: n, end: s, text: "summary" }, o = kt(this, i);
|
|
1285
1293
|
this.summaries.push(i), this.editSummary(o);
|
|
1286
|
-
},
|
|
1294
|
+
}, Ie = function(e) {
|
|
1287
1295
|
var n;
|
|
1288
1296
|
const t = this.summaries.findIndex((s) => s.id === e);
|
|
1289
1297
|
t > -1 && (this.summaries.splice(t, 1), (n = document.querySelector("#s-" + e)) == null || n.remove());
|
|
1290
|
-
},
|
|
1298
|
+
}, Ge = function(e) {
|
|
1291
1299
|
const t = e.children[1].getBBox(), n = 6, s = 3, i = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
1292
1300
|
b(i, {
|
|
1293
1301
|
x: t.x - n + "",
|
|
@@ -1299,14 +1307,14 @@ const Ve = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1299
1307
|
"stroke-width": "2",
|
|
1300
1308
|
fill: "none"
|
|
1301
1309
|
}), i.classList.add("selected"), e.appendChild(i), this.currentSummary = e;
|
|
1302
|
-
},
|
|
1310
|
+
}, Ue = function() {
|
|
1303
1311
|
var e, t;
|
|
1304
1312
|
(t = (e = this.currentSummary) == null ? void 0 : e.querySelector("rect")) == null || t.remove(), this.currentSummary = null;
|
|
1305
|
-
},
|
|
1313
|
+
}, Ke = function() {
|
|
1306
1314
|
this.summarySvg.innerHTML = "", this.summaries.forEach((e) => {
|
|
1307
1315
|
kt(this, e);
|
|
1308
1316
|
}), this.nodes.insertAdjacentElement("beforeend", this.summarySvg);
|
|
1309
|
-
},
|
|
1317
|
+
}, Je = function(e) {
|
|
1310
1318
|
if (console.time("editSummary"), !e)
|
|
1311
1319
|
return;
|
|
1312
1320
|
const t = e.childNodes[1];
|
|
@@ -1319,16 +1327,16 @@ const Ve = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1319
1327
|
origin
|
|
1320
1328
|
}));
|
|
1321
1329
|
}), console.timeEnd("editSummary");
|
|
1322
|
-
},
|
|
1330
|
+
}, Qe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1323
1331
|
__proto__: null,
|
|
1324
|
-
createSummary:
|
|
1325
|
-
editSummary:
|
|
1326
|
-
removeSummary:
|
|
1327
|
-
renderSummary:
|
|
1328
|
-
selectSummary:
|
|
1329
|
-
unselectSummary:
|
|
1332
|
+
createSummary: Fe,
|
|
1333
|
+
editSummary: Je,
|
|
1334
|
+
removeSummary: Ie,
|
|
1335
|
+
renderSummary: Ke,
|
|
1336
|
+
selectSummary: Ge,
|
|
1337
|
+
unselectSummary: Ue
|
|
1330
1338
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1331
|
-
function
|
|
1339
|
+
function Ze(e, t) {
|
|
1332
1340
|
const n = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
1333
1341
|
return b(n, {
|
|
1334
1342
|
version: "1.1",
|
|
@@ -1337,17 +1345,17 @@ function Qe(e, t) {
|
|
|
1337
1345
|
width: t
|
|
1338
1346
|
}), n;
|
|
1339
1347
|
}
|
|
1340
|
-
function
|
|
1348
|
+
function tn(e, t) {
|
|
1341
1349
|
return (parseInt(e) - parseInt(t)) / 2;
|
|
1342
1350
|
}
|
|
1343
|
-
function
|
|
1351
|
+
function en(e, t, n, s) {
|
|
1344
1352
|
const i = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
1345
1353
|
return e.childNodes[0].textContent.split(`
|
|
1346
1354
|
`).forEach((l, c) => {
|
|
1347
1355
|
const u = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
1348
1356
|
b(u, {
|
|
1349
1357
|
x: n + parseInt(t.paddingLeft) + "",
|
|
1350
|
-
y: s + parseInt(t.paddingTop) +
|
|
1358
|
+
y: s + parseInt(t.paddingTop) + tn(t.lineHeight, t.fontSize) * (c + 1) + parseFloat(t.fontSize) * (c + 1) + "",
|
|
1351
1359
|
"text-anchor": "start",
|
|
1352
1360
|
"font-family": t.fontFamily,
|
|
1353
1361
|
"font-size": `${t.fontSize}`,
|
|
@@ -1356,7 +1364,7 @@ function tn(e, t, n, s) {
|
|
|
1356
1364
|
}), u.innerHTML = l, i.appendChild(u);
|
|
1357
1365
|
}), i;
|
|
1358
1366
|
}
|
|
1359
|
-
function
|
|
1367
|
+
function nn(e, t, n, s) {
|
|
1360
1368
|
const i = e.childNodes[0].textContent, o = document.createElementNS("http://www.w3.org/2000/svg", "foreignObject");
|
|
1361
1369
|
b(o, {
|
|
1362
1370
|
x: n + parseInt(t.paddingLeft) + "",
|
|
@@ -1386,9 +1394,9 @@ function Q(e, t, n = !1) {
|
|
|
1386
1394
|
const l = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
1387
1395
|
l.appendChild(r);
|
|
1388
1396
|
let c;
|
|
1389
|
-
return n ? c =
|
|
1397
|
+
return n ? c = nn(t, s, i, o) : c = en(t, s, i, o), l.appendChild(c), l;
|
|
1390
1398
|
}
|
|
1391
|
-
function
|
|
1399
|
+
function sn(e, t) {
|
|
1392
1400
|
const n = getComputedStyle(t), { offsetLeft: s, offsetTop: i } = V(e.nodes, t), o = document.createElementNS("http://www.w3.org/2000/svg", "a"), r = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
1393
1401
|
return b(r, {
|
|
1394
1402
|
x: s + "",
|
|
@@ -1400,9 +1408,9 @@ function nn(e, t) {
|
|
|
1400
1408
|
fill: `${n.color}`
|
|
1401
1409
|
}), r.innerHTML = t.textContent, o.appendChild(r), o.setAttribute("href", t.href), o;
|
|
1402
1410
|
}
|
|
1403
|
-
const G = 100,
|
|
1411
|
+
const G = 100, on = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">', Mt = (e) => {
|
|
1404
1412
|
var h, d, a;
|
|
1405
|
-
const t = e.nodes, n = t.offsetHeight + G * 2, s = t.offsetWidth + G * 2, i =
|
|
1413
|
+
const t = e.nodes, n = t.offsetHeight + G * 2, s = t.offsetWidth + G * 2, i = Ze(n + "px", s + "px"), o = document.createElementNS("http://www.w3.org/2000/svg", "svg"), r = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
1406
1414
|
b(r, {
|
|
1407
1415
|
x: "0",
|
|
1408
1416
|
y: "0",
|
|
@@ -1425,14 +1433,14 @@ const G = 100, sn = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "
|
|
|
1425
1433
|
}), t.querySelectorAll(".icons > span").forEach((f) => {
|
|
1426
1434
|
o.appendChild(Q(e, f));
|
|
1427
1435
|
}), t.querySelectorAll(".hyper-link").forEach((f) => {
|
|
1428
|
-
o.appendChild(
|
|
1436
|
+
o.appendChild(sn(e, f));
|
|
1429
1437
|
}), b(o, {
|
|
1430
1438
|
x: G + "",
|
|
1431
1439
|
y: G + "",
|
|
1432
1440
|
overflow: "visible"
|
|
1433
|
-
}), i.appendChild(o),
|
|
1441
|
+
}), i.appendChild(o), on + i.outerHTML;
|
|
1434
1442
|
};
|
|
1435
|
-
function
|
|
1443
|
+
function rn(e) {
|
|
1436
1444
|
return new Promise((t, n) => {
|
|
1437
1445
|
const s = new FileReader();
|
|
1438
1446
|
s.onload = (i) => {
|
|
@@ -1442,11 +1450,11 @@ function on(e) {
|
|
|
1442
1450
|
}, s.readAsDataURL(e);
|
|
1443
1451
|
});
|
|
1444
1452
|
}
|
|
1445
|
-
const
|
|
1453
|
+
const ln = function() {
|
|
1446
1454
|
const e = Mt(this);
|
|
1447
1455
|
return new Blob([e], { type: "image/svg+xml" });
|
|
1448
|
-
},
|
|
1449
|
-
const e = Mt(this), t = new Blob([e], { type: "image/svg+xml" }), n = await
|
|
1456
|
+
}, cn = async function() {
|
|
1457
|
+
const e = Mt(this), t = new Blob([e], { type: "image/svg+xml" }), n = await rn(t);
|
|
1450
1458
|
return new Promise((s, i) => {
|
|
1451
1459
|
const o = new Image();
|
|
1452
1460
|
o.setAttribute("crossOrigin", "anonymous"), o.onload = () => {
|
|
@@ -1454,11 +1462,11 @@ const rn = function() {
|
|
|
1454
1462
|
r.width = o.width, r.height = o.height, r.getContext("2d").drawImage(o, 0, 0), r.toBlob(s, "image/png", 1);
|
|
1455
1463
|
}, o.src = n, o.onerror = i;
|
|
1456
1464
|
});
|
|
1457
|
-
},
|
|
1465
|
+
}, an = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1458
1466
|
__proto__: null,
|
|
1459
|
-
exportPng:
|
|
1460
|
-
exportSvg:
|
|
1461
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1467
|
+
exportPng: cn,
|
|
1468
|
+
exportSvg: ln
|
|
1469
|
+
}, Symbol.toStringTag, { value: "Module" })), hn = {}, dn = {
|
|
1462
1470
|
getObjById: vt,
|
|
1463
1471
|
generateNewObj: $t,
|
|
1464
1472
|
layout: At,
|
|
@@ -1471,10 +1479,10 @@ const rn = function() {
|
|
|
1471
1479
|
findEle: C,
|
|
1472
1480
|
changeTheme: ie,
|
|
1473
1481
|
...$e,
|
|
1482
|
+
...hn,
|
|
1483
|
+
...Re,
|
|
1484
|
+
...Qe,
|
|
1474
1485
|
...an,
|
|
1475
|
-
...Ve,
|
|
1476
|
-
...Je,
|
|
1477
|
-
...cn,
|
|
1478
1486
|
init(e) {
|
|
1479
1487
|
if (!e || !e.nodeData)
|
|
1480
1488
|
return new Error("MindElixir: `data` is required");
|
|
@@ -1511,13 +1519,13 @@ function M({
|
|
|
1511
1519
|
const _ = j.createElement("div");
|
|
1512
1520
|
_.className = "map-canvas", this.map = _, this.map.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.mindElixirBox.appendChild(this.container), this.nodes = j.createElement("me-nodes"), this.nodes.className = "main-node-container", this.lines = W("lines"), this.summarySvg = W("summary"), this.linkController = W("linkcontroller"), this.P2 = j.createElement("div"), this.P3 = j.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = rt(), this.line2 = rt(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.linkSvgGroup = W("topiclinks"), this.map.appendChild(this.nodes), this.overflowHidden ? this.container.style.overflow = "hidden" : Tt(this);
|
|
1513
1521
|
}
|
|
1514
|
-
M.prototype =
|
|
1522
|
+
M.prototype = dn;
|
|
1515
1523
|
M.LEFT = q;
|
|
1516
1524
|
M.RIGHT = Z;
|
|
1517
1525
|
M.SIDE = J;
|
|
1518
1526
|
M.THEME = mt;
|
|
1519
1527
|
M.DARK_THEME = gt;
|
|
1520
|
-
M.version = "3.2.
|
|
1528
|
+
M.version = "3.2.3";
|
|
1521
1529
|
M.E = C;
|
|
1522
1530
|
export {
|
|
1523
1531
|
M as default
|
|
@@ -26,6 +26,7 @@ export declare const drawCustomLink: (this: MindElixirInstance, from: Topic, to:
|
|
|
26
26
|
export declare const createLink: (this: MindElixirInstance, from: Topic, to: Topic) => void;
|
|
27
27
|
export declare const removeLink: (this: MindElixirInstance, linkSvg?: CustomSvg) => void;
|
|
28
28
|
export declare const selectLink: (this: MindElixirInstance, link: CustomSvg) => void;
|
|
29
|
+
export declare const unselectLink: (this: MindElixirInstance) => void;
|
|
29
30
|
export declare const hideLinkController: (this: MindElixirInstance) => void;
|
|
30
31
|
export declare const showLinkController: (this: MindElixirInstance, linkItem: LinkItem, fromData: DivData, toData: DivData) => void;
|
|
31
32
|
export declare function renderCustomLink(this: MindElixirInstance): void;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ declare namespace MindElixir {
|
|
|
23
23
|
createLink: (this: MindElixirInstance, from: import("./types/dom").Topic, to: import("./types/dom").Topic) => void;
|
|
24
24
|
removeLink: (this: MindElixirInstance, linkSvg?: import("./types/dom").CustomSvg | undefined) => void;
|
|
25
25
|
selectLink: (this: MindElixirInstance, link: import("./types/dom").CustomSvg) => void;
|
|
26
|
+
unselectLink: (this: MindElixirInstance) => void;
|
|
26
27
|
hideLinkController: (this: MindElixirInstance) => void;
|
|
27
28
|
showLinkController: (this: MindElixirInstance, linkItem: import("./customLink").LinkItem, fromData: import("./customLink").DivData, toData: import("./customLink").DivData) => void;
|
|
28
29
|
reshapeNode: (this: MindElixirInstance, ...args: unknown[]) => Promise<void>;
|
package/dist/types/methods.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ declare const methods: {
|
|
|
23
23
|
createLink: (this: MindElixirInstance, from: import("./index").Topic, to: import("./index").Topic) => void;
|
|
24
24
|
removeLink: (this: MindElixirInstance, linkSvg?: import("./index").CustomSvg | undefined) => void;
|
|
25
25
|
selectLink: (this: MindElixirInstance, link: import("./index").CustomSvg) => void;
|
|
26
|
+
unselectLink: (this: MindElixirInstance) => void;
|
|
26
27
|
hideLinkController: (this: MindElixirInstance) => void;
|
|
27
28
|
showLinkController: (this: MindElixirInstance, linkItem: customLink.LinkItem, fromData: customLink.DivData, toData: customLink.DivData) => void;
|
|
28
29
|
reshapeNode: (this: MindElixirInstance, ...args: unknown[]) => Promise<void>;
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -259,8 +259,6 @@ let mind = new MindElixir({
|
|
|
259
259
|
## Export as a Image
|
|
260
260
|
|
|
261
261
|
```typescript
|
|
262
|
-
import { exportPng } from './plugin/exportImage'
|
|
263
|
-
|
|
264
262
|
const mind = {
|
|
265
263
|
/** mind elixir instance */
|
|
266
264
|
}
|
|
@@ -327,14 +325,14 @@ Be aware that Mind Elixir will not observe the change of `prefers-color-scheme`.
|
|
|
327
325
|
| Tab | Insert Child Node |
|
|
328
326
|
| F1 | Center the Map |
|
|
329
327
|
| F2 | Begin Editing the Current Node |
|
|
330
|
-
|
|
|
331
|
-
|
|
|
332
|
-
|
|
|
333
|
-
| PageUp
|
|
334
|
-
| PageDown
|
|
335
|
-
| Ctrl +
|
|
336
|
-
| Ctrl +
|
|
337
|
-
| Ctrl +
|
|
328
|
+
| ↑ | Select the Previous Sibling Node |
|
|
329
|
+
| ↓ | Select the Next Sibling Node |
|
|
330
|
+
| ← / → | Select Parent or First Child |
|
|
331
|
+
| PageUp / Alt + ↑ | Move Up Node |
|
|
332
|
+
| PageDown / Alt + ↓ | Move Down Node |
|
|
333
|
+
| Ctrl + ↑ | Change Layout Pattern to Side |
|
|
334
|
+
| Ctrl + ← | Change Layout Pattern to Left |
|
|
335
|
+
| Ctrl + → | Change Layout Pattern to Right |
|
|
338
336
|
| Ctrl + C | Copy the Current Node |
|
|
339
337
|
| Ctrl + V | Paste the Copied Node |
|
|
340
338
|
| Ctrl + "+" | Zoom In Mind Map |
|
|
@@ -347,7 +345,6 @@ Be aware that Mind Elixir will not observe the change of `prefers-color-scheme`.
|
|
|
347
345
|
- [@mind-elixir/node-menu-neo](https://github.com/ssshooter/node-menu-neo)
|
|
348
346
|
- [@mind-elixir/export-xmind](https://github.com/ssshooter/export-xmind)
|
|
349
347
|
- [@mind-elixir/export-html](https://github.com/ssshooter/export-html)
|
|
350
|
-
- [@mind-elixir/export-image](https://github.com/ssshooter/export-image) (WIP🚧)
|
|
351
348
|
- [mind-elixir-react](https://github.com/ssshooter/mind-elixir-react)
|
|
352
349
|
|
|
353
350
|
## Development
|