Skip to content

Commit

Permalink
Merge pull request #107 from ssshooter/v1.0.1
Browse files Browse the repository at this point in the history
V1.0.1
  • Loading branch information
SSShooter authored Jul 7, 2022
2 parents 4e10550 + a3379cb commit 3fe97d0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mind-elixir",
"version": "1.0.0",
"version": "1.0.1",
"description": "Mind elixir is a free open source mind map core.",
"main": "dist/MindElixir.js",
"scripts": {
Expand Down
8 changes: 2 additions & 6 deletions src/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
pointer-events: all;
max-width: 800px;
white-space: pre-wrap;
line-height: 1; // assure the line-height consistency between different languages
line-height: 1.2; // assure the line-height consistency between different languages
#input-box {
padding: 5px;
}
Expand Down Expand Up @@ -152,11 +152,6 @@
position: absolute;
height: 18px;
width: 18px;
// line-height: 12px;
text-align: center;
// border-radius: 50%;
// border: 1px solid #4f4f4f;
// background-color: #fff;
background-image: url('./icons/add-circle.svg');
background-repeat: no-repeat;
background-size: contain;
Expand Down Expand Up @@ -246,6 +241,7 @@
top: 0;
left: 0;
background-color: #fff;
color: #666666;
width: max-content; // let words expand the div and keep max length at the same time
max-width: 800px;
z-index: 11;
Expand Down
3 changes: 2 additions & 1 deletion src/interact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,8 @@ export const expandNode = function(el, isExpand) {
export const refresh = function(data) {
// add parent property to every node
if (data) {
this.nodeData = data
this.nodeData = data.nodeData
this.linkData = data.linkData || {}
}
this.addParentLink(this.nodeData)
// create dom element for every node
Expand Down
8 changes: 4 additions & 4 deletions src/nodeOperation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,15 +284,15 @@ export const addChild = function(el: NodeElement, node: NodeObj) {
const nodeEle = el || this.currentNode
if (!nodeEle) return
const { newTop, newNodeObj } = addChildFunction.call(this, nodeEle, node)
this.bus.fire('operation', {
name: 'addChild',
obj: newNodeObj,
})
console.timeEnd('addChild')
if (!node) {
this.createInputDiv(newTop.children[0])
}
this.selectNode(newTop.children[0], true)
this.bus.fire('operation', {
name: 'addChild',
obj: newNodeObj,
})
}
// uncertain link disappear sometimes??
// TODO while direction = SIDE, move up won't change the direction of primary node
Expand Down

0 comments on commit 3fe97d0

Please sign in to comment.