mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-11 01:43:23 +01:00
Revert Desginer changes.
This commit is contained in:
parent
041adbc142
commit
e1db8e7b47
@ -53,7 +53,7 @@ class CommandContext {
|
||||
/** */
|
||||
createTopic(model) {
|
||||
$assert(model, 'model can not be null');
|
||||
return this._designer.nodeModelToNodeGraph(model);
|
||||
return this._designer.nodeModelToTopic(model);
|
||||
}
|
||||
|
||||
/** */
|
||||
|
@ -408,8 +408,7 @@ class Designer extends Events {
|
||||
return this._model;
|
||||
}
|
||||
|
||||
/** create a NodeModel for the selected node's child and add it via the ActionDispatcher */
|
||||
private _createChildForSelectedNode(): void {
|
||||
createChildForSelectedNode(): void {
|
||||
const nodes = this.getModel().filterSelectedTopics();
|
||||
if (nodes.length <= 0) {
|
||||
// If there are more than one node selected,
|
||||
@ -512,7 +511,7 @@ class Designer extends Events {
|
||||
if (!topic.getOutgoingConnectedTopic()) {
|
||||
// Central topic and isolated topics ....
|
||||
// Central topic doesn't have siblings ...
|
||||
this._createChildForSelectedNode();
|
||||
this.createChildForSelectedNode();
|
||||
} else {
|
||||
const parentTopic = topic.getOutgoingConnectedTopic();
|
||||
const siblingModel = this._createSiblingModel(topic);
|
||||
@ -593,7 +592,7 @@ class Designer extends Events {
|
||||
// Building node graph ...
|
||||
const branches = mindmap.getBranches();
|
||||
branches.forEach((branch) => {
|
||||
const nodeGraph = this._nodeModelToTopic(branch);
|
||||
const nodeGraph = this.nodeModelToTopic(branch);
|
||||
nodeGraph.setBranchVisibility(true);
|
||||
});
|
||||
|
||||
@ -628,7 +627,7 @@ class Designer extends Events {
|
||||
return this._options.readOnly;
|
||||
}
|
||||
|
||||
private _nodeModelToTopic(nodeModel: NodeModel):Topic {
|
||||
nodeModelToTopic(nodeModel: NodeModel):Topic {
|
||||
$assert(nodeModel, 'Node model can not be null');
|
||||
let children = nodeModel.getChildren().slice();
|
||||
children = children.sort((a, b) => a.getOrder() - b.getOrder());
|
||||
@ -639,7 +638,7 @@ class Designer extends Events {
|
||||
this._workspace.append(result);
|
||||
children.forEach((child) => {
|
||||
if ($defined(child)) {
|
||||
this._nodeModelToTopic(child);
|
||||
this.nodeModelToTopic(child);
|
||||
}
|
||||
});
|
||||
return result;
|
||||
|
@ -30,12 +30,6 @@ div#mindplot {
|
||||
background-size: 50px 50px;
|
||||
}
|
||||
|
||||
div#small_error_icon {
|
||||
padding-left: 18px;
|
||||
min-height: 16px;
|
||||
background: url(../images/error_icon.png) bottom left no-repeat !important;
|
||||
}
|
||||
|
||||
.notesTip {
|
||||
background-color: #dfcf3c;
|
||||
padding: 5px 15px;
|
||||
|
Loading…
Reference in New Issue
Block a user