Fix depth copy issue.

Update welcome.xml map.
This commit is contained in:
Paulo Gustavo Veiga 2021-12-14 19:28:53 -08:00
parent 82aa543aac
commit 643f91c18b
5 changed files with 113 additions and 43 deletions

View File

@ -75,7 +75,7 @@ class AddTopicCommand extends Command {
// Delete disconnected the nodes. Create a copy of the topics ... // Delete disconnected the nodes. Create a copy of the topics ...
const clonedModel = []; const clonedModel = [];
this._models.forEach((model) => { this._models.forEach((model) => {
clonedModel.push({ ...model }); clonedModel.push(model.clone());
}); });
// Finally, remove the nodes ... // Finally, remove the nodes ...

View File

@ -53,14 +53,14 @@ class DeleteCommand extends Command {
// Delete relationships // Delete relationships
const relationships = this._collectInDepthRelationships(topic); const relationships = this._collectInDepthRelationships(topic);
this._deletedRelModel.append(relationships.map((rel) => ({ ...rel.getModel() }))); this._deletedRelModel = this._deletedRelModel.concat(relationships.map((rel) => rel.getModel().clone()));
relationships.forEach((relationship) => { relationships.forEach((relationship) => {
commandContext.deleteRelationship(relationship); commandContext.deleteRelationship(relationship);
}); });
// Store information for undo ... // Store information for undo ...
const clonedModel = { ...model }; const clonedModel = model.clone();
this._deletedTopicModels.push(clonedModel); this._deletedTopicModels.push(clonedModel);
const outTopic = topic.getOutgoingConnectedTopic(); const outTopic = topic.getOutgoingConnectedTopic();
let outTopicId = null; let outTopicId = null;
@ -77,7 +77,7 @@ class DeleteCommand extends Command {
const rels = commandContext.findRelationships(this._relIds); const rels = commandContext.findRelationships(this._relIds);
if (rels.length > 0) { if (rels.length > 0) {
rels.forEach(((rel) => { rels.forEach(((rel) => {
this._deletedRelModel.push({ ...rel.getModel() }); this._deletedRelModel.push(rel.getModel().clone());
commandContext.deleteRelationship(rel); commandContext.deleteRelationship(rel);
})); }));
} }
@ -156,7 +156,7 @@ class DeleteCommand extends Command {
const children = topic.getChildren(); const children = topic.getChildren();
const rels = children.map(((t) => this._collectInDepthRelationships(t))); const rels = children.map(((t) => this._collectInDepthRelationships(t)));
result.append(rels.flatten()); result = result.concat(rels.flat());
if (result.length > 0) { if (result.length > 0) {
// Filter for unique ... // Filter for unique ...

View File

@ -128,8 +128,8 @@ class NodeModel extends INodeModel {
return cnode; return cnode;
}); });
result._properties = Object.clone(this._properties); result._properties = { ...this._properties };
result._feature = this._feature.clone(); result._feature = { ...this._feature };
return result; return result;
} }

View File

@ -0,0 +1,48 @@
<map name="welcome" version="tango">
<topic central="true" text="Welcome To WiseMapping" id="1" fontStyle=";;#dfcfe6;;;" bgColor="#0a0a08">
<topic position="178,-130" order="0" text="Try it Now!" id="11" fontStyle=";;#ffffff;;;" bgColor="#250be3"
brColor="#080559">
<topic position="272,-156" order="0" text="Double Click" id="12" fontStyle=";;#001be6;;italic;"/>
<topic position="274,-130" order="1" text=" INS to insert" id="13" fontStyle=";;#001be6;;italic;"/>
<topic position="285,-104" order="2" text="Drag map to move" id="14" fontStyle=";;#001be6;;italic;"/>
</topic>
<topic position="-189,-52" order="1" text="Productivity" id="2" fontStyle=";;#104f11;;;" bgColor="#d9b518">
<icon id="chart_bar"/>
<topic position="-310,-104" order="0" text="Share your ideas" id="3">
<icon id="bulb_light_on"/>
</topic>
<topic position="-299,-25" order="2" text="Brainstorming" id="4"/>
<topic position="-283,1" order="3" text="Visual " id="5"/>
<topic position="-307,-65" order="1" shape="image" image="80,43:images/logo-small.png" id="27"
metadata="{'media':'video,'url':'http://www.youtube.com/watch?v=P3FrXftyuzw&amp;feature=g-vrec&amp;context=G2b4ab69RVAAAAAAAAAA'}"/>
</topic>
<topic position="185,-39" order="2" text="Mind Mapping" id="6" fontStyle=";;#602378;;;" bgColor="#edabff">
<topic position="303,-78" order="0" text="Share with Collegues" id="7"/>
<topic position="275,-52" order="1" text="Online" id="8"/>
<topic position="299,-26" order="2" text="Anyplace, Anytime" id="9"/>
<topic position="277,0" order="3" text="Free!!!" id="10"/>
</topic>
<topic position="-183,66" order="3" text="Web 2.0 Tool" id="22" fontStyle=";;#0c1d6b;;;" bgColor="#add1f7">
<topic position="-281,27" order="0" text="Collaborate" id="23"/>
<topic position="-302,53" order="1" text="No plugin required" id="24">
<icon id="conn_disconnect"/>
</topic>
<topic position="-271,79" order="2" text="Share" id="25"/>
<topic position="-282,105" order="3" text="Easy to use" id="26"/>
</topic>
<topic position="171,91" order="4" text="Features" id="15">
<topic position="266,26" order="0" text="Links to Sites" id="16" fontStyle=";6;;;;">
<link url="http://www.digg.com" type="url"/>
</topic>
<topic position="245,52" order="1" text="Fonts" id="17"/>
<topic position="255,78" order="2" text="Topic Color" id="18"/>
<topic position="260,104" order="3" text="Topic Shapes" shape="line" id="19"/>
<topic position="252,130" order="4" text="Icons" id="20">
<icon id="object_rainbow"/>
</topic>
<topic position="272,156" order="5" text="History Changes" id="21">
<icon id="arrowc_turn_left"/>
</topic>
</topic>
</topic>
</map>

View File

@ -1,48 +1,70 @@
<map name="welcome" version="tango"> <map name="3" version="tango">
<topic central="true" text="Welcome To WiseMapping" id="1" fontStyle=";;#dfcfe6;;;" bgColor="#0a0a08"> <topic central="true" text="Welcome To WiseMapping" id="1" fontStyle=";;#ffffff;;;" bgColor="#509dc0">
<topic position="178,-130" order="0" text="Try it Now!" id="11" fontStyle=";;#ffffff;;;" bgColor="#250be3" <icon id="sign_info"/>
brColor="#080559"> <topic position="199,-112" order="0" id="30">
<topic position="272,-156" order="0" text="Double Click" id="12" fontStyle=";;#001be6;;italic;"/> <text><![CDATA[5 min tutorial video ?
<topic position="274,-130" order="1" text=" INS to insert" id="13" fontStyle=";;#001be6;;italic;"/> Follow the link !]]></text>
<topic position="285,-104" order="2" text="Drag map to move" id="14" fontStyle=";;#001be6;;italic;"/> <link url="https://www.youtube.com/tv?vq=medium#/watch?v=rKxZwNKs9cE" urlType="url"/>
<icon id="hard_computer"/>
</topic> </topic>
<topic position="-189,-52" order="1" text="Productivity" id="2" fontStyle=";;#104f11;;;" bgColor="#d9b518"> <topic position="-167,-112" order="1" text="Try it Now!" id="11" fontStyle=";;#525c61;;;" bgColor="#250be3" brColor="#080559">
<icon id="chart_bar"/> <icon id="face_surprise"/>
<topic position="-310,-104" order="0" text="Share your ideas" id="3"> <topic position="-260,-141" order="0" text="Double Click" id="12" fontStyle=";;#525c61;;italic;"/>
<icon id="bulb_light_on"/> <topic position="-278,-112" order="1" id="13">
<text><![CDATA[Press "enter" to add a
Sibling]]></text>
</topic> </topic>
<topic position="-299,-25" order="2" text="Brainstorming" id="4"/> <topic position="-271,-83" order="2" text="Drag map to move" id="14" fontStyle=";;#525c61;;italic;"/>
<topic position="-283,1" order="3" text="Visual " id="5"/>
<topic position="-307,-65" order="1" shape="image" image="80,43:images/logo-small.png" id="27"
metadata="{'media':'video,'url':'http://www.youtube.com/watch?v=P3FrXftyuzw&amp;feature=g-vrec&amp;context=G2b4ab69RVAAAAAAAAAA'}"/>
</topic> </topic>
<topic position="185,-39" order="2" text="Mind Mapping" id="6" fontStyle=";;#602378;;;" bgColor="#edabff"> <topic position="155,-18" order="2" text="Features" id="15" fontStyle=";;#525c61;;;">
<topic position="303,-78" order="0" text="Share with Collegues" id="7"/> <topic position="244,-80" order="0" text="Links to Sites" id="16" fontStyle=";6;#525c61;;;">
<topic position="275,-52" order="1" text="Online" id="8"/> <link url="http://www.digg.com" urlType="url"/>
<topic position="299,-26" order="2" text="Anyplace, Anytime" id="9"/>
<topic position="277,0" order="3" text="Free!!!" id="10"/>
</topic> </topic>
<topic position="-183,66" order="3" text="Web 2.0 Tool" id="22" fontStyle=";;#0c1d6b;;;" bgColor="#add1f7"> <topic position="224,-30" order="1" text="Styles" id="31">
<topic position="-281,27" order="0" text="Collaborate" id="23"/> <topic position="285,-55" order="0" text="Fonts" id="17" fontStyle=";;#525c61;;;"/>
<topic position="-302,53" order="1" text="No plugin required" id="24"> <topic position="299,-30" order="1" text="Topic Shapes" shape="line" id="19" fontStyle=";;#525c61;;;"/>
<icon id="conn_disconnect"/> <topic position="295,-5" order="2" text="Topic Color" id="18" fontStyle=";;#525c61;;;"/>
</topic> </topic>
<topic position="-271,79" order="2" text="Share" id="25"/> <topic position="229,20" order="2" text="Icons" id="20" fontStyle=";;#525c61;;;">
<topic position="-282,105" order="3" text="Easy to use" id="26"/>
</topic>
<topic position="171,91" order="4" text="Features" id="15">
<topic position="266,26" order="0" text="Links to Sites" id="16" fontStyle=";6;;;;">
<link url="http://www.digg.com" type="url"/>
</topic>
<topic position="245,52" order="1" text="Fonts" id="17"/>
<topic position="255,78" order="2" text="Topic Color" id="18"/>
<topic position="260,104" order="3" text="Topic Shapes" shape="line" id="19"/>
<topic position="252,130" order="4" text="Icons" id="20">
<icon id="object_rainbow"/> <icon id="object_rainbow"/>
</topic> </topic>
<topic position="272,156" order="5" text="History Changes" id="21"> <topic position="249,45" order="3" text="History Changes" id="21" fontStyle=";;#525c61;;;">
<icon id="arrowc_turn_left"/> <icon id="arrowc_turn_left"/>
</topic> </topic>
</topic> </topic>
<topic position="-176,-21" order="3" text="Mind Mapping" id="6" fontStyle=";;#525c61;;;" bgColor="#edabff">
<icon id="thumb_thumb_up"/>
<topic position="-293,-58" order="0" text="Share with Collegues" id="7" fontStyle=";;#525c61;;;"/>
<topic position="-266,-33" order="1" text="Online" id="8" fontStyle=";;#525c61;;;"/>
<topic position="-288,-8" order="2" text="Anyplace, Anytime" id="9" fontStyle=";;#525c61;;;"/>
<topic position="-266,17" order="3" text="Free!!!" id="10" fontStyle=";;#525c61;;;"/>
</topic> </topic>
<topic position="171,95" order="4" text="Productivity" id="2" fontStyle=";;#525c61;;;" bgColor="#d9b518">
<icon id="chart_bar"/>
<topic position="281,70" order="0" text="Share your ideas" id="3" fontStyle=";;#525c61;;;">
<icon id="bulb_light_on"/>
</topic>
<topic position="270,95" order="1" text="Brainstorming" id="4" fontStyle=";;#525c61;;;"/>
<topic position="256,120" order="2" text="Visual " id="5" fontStyle=";;#525c61;;;"/>
</topic>
<topic position="-191,54" order="5" text="Install In Your Server" id="27" fontStyle=";;#525c61;;;">
<icon id="hard_computer"/>
<topic position="-319,42" order="0" text="Open Source" id="29" fontStyle=";;#525c61;;;">
<icon id="soft_penguin"/>
<link url="http://www.wisemapping.org/" urlType="url"/>
</topic>
<topic position="-310,67" order="1" text="Download" id="28" fontStyle=";;#525c61;;;">
<link url="http://www.wisemapping.com/inyourserver.html" urlType="url"/>
</topic>
</topic>
<topic position="-169,117" order="7" text="Collaborate" id="32">
<icon id="people_group"/>
<topic position="-253,92" order="0" text="Embed" id="33"/>
<topic position="-254,117" order="1" text="Publish" id="34"/>
<topic position="-277,142" order="2" text="Share for Edition" id="35">
<icon id="mail_envelop"/>
</topic>
</topic>
</topic>
<relationship srcTopicId="30" destTopicId="11" lineType="3" srcCtrlPoint="-80,-56" destCtrlPoint="110,-116" endArrow="false" startArrow="true"/>
</map> </map>