mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-15 19:47:57 +01:00
Change to typescript
This commit is contained in:
parent
5ad8d94ac8
commit
be638eb7ed
@ -707,10 +707,11 @@ abstract class Topic extends NodeGraph {
|
||||
// Do some fancy animation ....
|
||||
const elements = this._flatten2DElements(this);
|
||||
elements.forEach((elem) => {
|
||||
elem.setVisibility(!value, 250);
|
||||
elem.setVisibility(!value, 250)
|
||||
});
|
||||
|
||||
EventBus.instance.fireEvent('childShrinked', model);
|
||||
|
||||
}
|
||||
|
||||
getShrinkConnector(): ShirinkConnector | undefined {
|
||||
@ -902,6 +903,7 @@ abstract class Topic extends NodeGraph {
|
||||
current.setVisibility(value);
|
||||
}
|
||||
|
||||
/** */
|
||||
setVisibility(value: boolean, fade = 0): void {
|
||||
this._setTopicVisibility(value, fade);
|
||||
|
||||
@ -958,9 +960,8 @@ abstract class Topic extends NodeGraph {
|
||||
relationship.setVisibility(
|
||||
value
|
||||
&& (targetParent == null || !targetParent.areChildrenShrunken())
|
||||
&& (sourceParent == null || !sourceParent.areChildrenShrunken()),
|
||||
fade,
|
||||
);
|
||||
&& (sourceParent == null || !sourceParent.areChildrenShrunken())
|
||||
, fade);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -40,14 +40,6 @@ const TopicFeatureFactory = {
|
||||
icon: NoteIcon,
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {mindplot.Topic} topic
|
||||
* @param {mindplot.model.FeatureModel} model
|
||||
* @param {Boolean} readOnly true if the editor is running in read-only mode
|
||||
* @throws will throw an error if topic is null or undefined
|
||||
* @throws will throw v an error if model is null or undefined
|
||||
* @return {mindplot.n,nmn mn4 r be5qnwwddwsz5on} a new instance of the icon subclass matching the topic feature
|
||||
*/
|
||||
createIcon(topic, model, readOnly) {
|
||||
$assert(topic, 'topic can not be null');
|
||||
$assert(model, 'model can not be null');
|
||||
|
@ -15,9 +15,9 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import RootedTreeSet from './RootedTreeSet';
|
||||
import RootedTreeSet from "./RootedTreeSet";
|
||||
import Node from './Node';
|
||||
import PositionType from '../PositionType';
|
||||
import PositionType from "../PositionType";
|
||||
|
||||
abstract class ChildrenSorterStrategy {
|
||||
abstract computeChildrenIdByHeights(treeSet: RootedTreeSet, node: Node);
|
||||
|
Loading…
Reference in New Issue
Block a user