Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkMindCkm committed Dec 25, 2020
2 parents 3cab3d3 + 740a865 commit b95e955
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 50 deletions.
2 changes: 2 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:


The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.


THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@

[English](https://github.com/MarkMindLtd/Mark-Mind) [中文](https://github.com/MarkMindLtd/Mark-Mind/blob/main/README%20-%20zh.md)

> An mind map and outline tool base on electron vue
> An mind map and outline tool base on electron vue,
### Download

[window](https://github.com/MarkMindLtd/Mark-Mind/releases/download/1.1.7/Mark.Mind.Setup.1.1.7.exe) [Mac](https://github.com/MarkMindLtd/Mark-Mind/releases/download/1.1.7/MarkMind-1.1.7.dmg) [linux.AppImage](https://github.com/MarkMindLtd/Mark-Mind/releases/download/1.1.7/Mark.Mind.1.1.7.AppImage)

### Live editor

[live editor](https://www.markmind.org)

### Build Setup

```bash
Expand Down
54 changes: 5 additions & 49 deletions src/renderer/mind/import/importXmind.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,44 +72,7 @@ const importXmind=function(data){
mind.relateLinkData.push(obj);
})


//list=[];
// transferData(data.root,null);
// var marks=[];
// var obj={};
// list.forEach(node=>{
// node.resource&&node.resource.forEach(r=>{
// if(!obj[r]){
// var id=parseInt(+new Date())+parseInt(Math.random()*50);
// var tagObj={
// id,
// text:r
// };
// marks.push(tagObj);
// node.marks.push(tagObj);
// obj[r]=true;
// }else{
// marks.forEach(item=>{
// if(item.text==r){
// node.marks.push(item);
// }
// })
// }
// })
// delete node.resource;
// });
// var len=color.length;
// marks.forEach((item,i)=>{
// if(i<len){
// item.fill=color[i];
// }else{
// item.fill=color[parseInt(Math.random()*len)];
// }
// item.checked=false;
// });

// mind.data.push(list);
// mind.marks=marks;

return mind;
};

Expand Down Expand Up @@ -146,10 +109,7 @@ function transferData(data,parentId,list,mainFlag){
x:0,
y:0
};
// if(data.data.progress==9){
// node.percent='100';
// //node.icon=['wancheng']
// }


if(!parentId){
node.layout={};
Expand All @@ -167,17 +127,13 @@ function transferData(data,parentId,list,mainFlag){
node.link=data.href;
}
if(data.notes){
// console.log(data.notes);
node.remark=data.notes.plain.content.replace(/\n/g,"<br>").trim();
}
if(data.image){
node.isImageNode=true;

node.image='';
node.imageName=data.image.src.replace('xap:resources/','');

// node.imageWidth=data.data.imageSize.width;
// node.imageHeight=data.data.imageSize.height;
}

if(data.labels){
Expand Down Expand Up @@ -208,7 +164,7 @@ function transferData(data,parentId,list,mainFlag){
transferData(c,data.id,list);
});

//归纳
//induce
data.summaries&&data.summaries.forEach(sum=>{
var r=sum.range.substring(1,sum.range.length-1);
// console.log(r,'induce');
Expand Down Expand Up @@ -244,7 +200,7 @@ function transferData(data,parentId,list,mainFlag){
mind.induceData.push(induceData);
});

//外框
//wireframe
data.boundaries&&data.boundaries.forEach(bum=>{
var r=bum.range.substring(1,bum.range.length-1);
var s=r.split(',')[0];
Expand Down Expand Up @@ -297,4 +253,4 @@ function transferData(data,parentId,list,mainFlag){
}


export default importXmind;
export default importXmind;

0 comments on commit b95e955

Please sign in to comment.