Change class visibility

This commit is contained in:
Paulo Gustavo Veiga 2022-01-02 21:04:37 -08:00
parent b929026267
commit 19d7706c1b
6 changed files with 27 additions and 26 deletions

View File

@ -21,9 +21,9 @@ export type FeatureType = 'note' | 'link' | 'icon';
class FeatureModel {
static _next_id = 0;
_id: number;
_type: FeatureType;
_attributes: {};
private _id: number;
private _type: FeatureType;
private _attributes: {};
/**
* @constructs

View File

@ -27,7 +27,7 @@ abstract class INodeModel {
static MAIN_TOPIC_TO_MAIN_TOPIC_DISTANCE: number = 220;
static _next_uuid: number = 0;
_mindmap: Mindmap;
protected _mindmap: Mindmap;
constructor(mindmap: Mindmap) {
$assert(mindmap && mindmap.getBranches, 'mindmap can not be null');

View File

@ -25,7 +25,7 @@ class LinkModel extends FeatureModel {
}
/** @return {String} the url attribute value */
getUrl() {
getUrl():string {
return this.getAttribute('url');
}

View File

@ -23,11 +23,11 @@ import RelationshipModel from './RelationshipModel';
import ModelCodeName from '../persistence/ModelCodeName';
class Mindmap extends IMindmap {
_description: string;
_version: string;
_id: string;
_branches: Array<NodeModel>;
_relationships: Array<RelationshipModel>;
private _description: string;
private _version: string;
private _id: string;
private _branches: Array<NodeModel>;
private _relationships: Array<RelationshipModel>;
constructor(id: string, version: string = ModelCodeName.TANGO) {
super();

View File

@ -23,10 +23,10 @@ import FeatureModel from './FeatureModel';
import Mindmap from './Mindmap';
class NodeModel extends INodeModel {
_properties: {};
_children: INodeModel[];
_features: FeatureModel[];
_parent: INodeModel;
private _properties: {};
private _children: INodeModel[];
private _features: FeatureModel[];
private _parent: INodeModel;
constructor(type: NodeModelType, mindmap: Mindmap, id: number) {
$assert(type, 'Node type can not be null');

View File

@ -16,18 +16,19 @@
* limitations under the License.
*/
import { $assert, $defined } from '@wisemapping/core-js';
import Point from '@wisemapping/web2d';
import ConnectionLine from '../ConnectionLine';
class RelationshipModel {
static _next_uuid: number = 0;
_id: number;
_sourceTargetId: number;
_targetTopicId: number;
_lineType: number;
_srcCtrlPoint: any;
_destCtrlPoint: any;
_endArrow: boolean;
_startArrow: boolean;
private _id: number;
private _sourceTargetId: number;
private _targetTopicId: number;
private _lineType: number;
private _srcCtrlPoint: Point;
private _destCtrlPoint: Point;
private _endArrow: boolean;
private _startArrow: boolean;
constructor(sourceTopicId: number, targetTopicId: number) {
$assert($defined(sourceTopicId), 'from node type can not be null');
@ -72,22 +73,22 @@ class RelationshipModel {
}
/** */
getSrcCtrlPoint() {
getSrcCtrlPoint(): Point {
return this._srcCtrlPoint;
}
/** */
setSrcCtrlPoint(srcCtrlPoint) {
setSrcCtrlPoint(srcCtrlPoint: Point) {
this._srcCtrlPoint = srcCtrlPoint;
}
/** */
getDestCtrlPoint() {
getDestCtrlPoint(): Point {
return this._destCtrlPoint;
}
/** */
setDestCtrlPoint(destCtrlPoint) {
setDestCtrlPoint(destCtrlPoint: Point) {
this._destCtrlPoint = destCtrlPoint;
}