Skip to content

Commit 3fe97d0

Browse files
authored
Merge pull request #107 from ssshooter/v1.0.1
V1.0.1
2 parents 4e10550 + a3379cb commit 3fe97d0

File tree

4 files changed

+9
-12
lines changed

4 files changed

+9
-12
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mind-elixir",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "Mind elixir is a free open source mind map core.",
55
"main": "dist/MindElixir.js",
66
"scripts": {

src/index.less

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
pointer-events: all;
100100
max-width: 800px;
101101
white-space: pre-wrap;
102-
line-height: 1; // assure the line-height consistency between different languages
102+
line-height: 1.2; // assure the line-height consistency between different languages
103103
#input-box {
104104
padding: 5px;
105105
}
@@ -152,11 +152,6 @@
152152
position: absolute;
153153
height: 18px;
154154
width: 18px;
155-
// line-height: 12px;
156-
text-align: center;
157-
// border-radius: 50%;
158-
// border: 1px solid #4f4f4f;
159-
// background-color: #fff;
160155
background-image: url('./icons/add-circle.svg');
161156
background-repeat: no-repeat;
162157
background-size: contain;
@@ -246,6 +241,7 @@
246241
top: 0;
247242
left: 0;
248243
background-color: #fff;
244+
color: #666666;
249245
width: max-content; // let words expand the div and keep max length at the same time
250246
max-width: 800px;
251247
z-index: 11;

src/interact.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,8 @@ export const expandNode = function(el, isExpand) {
333333
export const refresh = function(data) {
334334
// add parent property to every node
335335
if (data) {
336-
this.nodeData = data
336+
this.nodeData = data.nodeData
337+
this.linkData = data.linkData || {}
337338
}
338339
this.addParentLink(this.nodeData)
339340
// create dom element for every node

src/nodeOperation.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -284,15 +284,15 @@ export const addChild = function(el: NodeElement, node: NodeObj) {
284284
const nodeEle = el || this.currentNode
285285
if (!nodeEle) return
286286
const { newTop, newNodeObj } = addChildFunction.call(this, nodeEle, node)
287+
this.bus.fire('operation', {
288+
name: 'addChild',
289+
obj: newNodeObj,
290+
})
287291
console.timeEnd('addChild')
288292
if (!node) {
289293
this.createInputDiv(newTop.children[0])
290294
}
291295
this.selectNode(newTop.children[0], true)
292-
this.bus.fire('operation', {
293-
name: 'addChild',
294-
obj: newNodeObj,
295-
})
296296
}
297297
// uncertain link disappear sometimes??
298298
// TODO while direction = SIDE, move up won't change the direction of primary node

0 commit comments

Comments
 (0)