mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-05 07:03:24 +01:00
Fix children shrunken issue.
This commit is contained in:
parent
df98282620
commit
90b584569b
@ -627,7 +627,18 @@ mindplot.Topic = new Class({
|
|||||||
var elements = this._flatten2DElements(this);
|
var elements = this._flatten2DElements(this);
|
||||||
var fade = new mindplot.util.FadeEffect(elements, !value);
|
var fade = new mindplot.util.FadeEffect(elements, !value);
|
||||||
fade.addEvent('complete', function () {
|
fade.addEvent('complete', function () {
|
||||||
|
// Set focus on the parent node ...
|
||||||
|
if (value) {
|
||||||
|
this.setOnFocus(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set focus in false for all the children ...
|
||||||
|
elements.forEach(function (elem) {
|
||||||
|
if (elem.setOnFocus) {
|
||||||
|
elem.setOnFocus(false);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
}.bind(this));
|
||||||
fade.start();
|
fade.start();
|
||||||
|
|
||||||
mindplot.EventBus.instance.fireEvent(mindplot.EventBus.events.NodeShrinkEvent, model);
|
mindplot.EventBus.instance.fireEvent(mindplot.EventBus.events.NodeShrinkEvent, model);
|
||||||
@ -1192,9 +1203,11 @@ mindplot.Topic = new Class({
|
|||||||
var relationships = child.getRelationships();
|
var relationships = child.getRelationships();
|
||||||
result = result.concat(relationships);
|
result = result.concat(relationships);
|
||||||
|
|
||||||
|
if(!child.areChildrenShrunken()){
|
||||||
var innerChilds = this._flatten2DElements(child);
|
var innerChilds = this._flatten2DElements(child);
|
||||||
result = result.concat(innerChilds);
|
result = result.concat(innerChilds);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user