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 { class FeatureModel {
static _next_id = 0; static _next_id = 0;
_id: number; private _id: number;
_type: FeatureType; private _type: FeatureType;
_attributes: {}; private _attributes: {};
/** /**
* @constructs * @constructs

View File

@ -27,7 +27,7 @@ abstract class INodeModel {
static MAIN_TOPIC_TO_MAIN_TOPIC_DISTANCE: number = 220; static MAIN_TOPIC_TO_MAIN_TOPIC_DISTANCE: number = 220;
static _next_uuid: number = 0; static _next_uuid: number = 0;
_mindmap: Mindmap; protected _mindmap: Mindmap;
constructor(mindmap: Mindmap) { constructor(mindmap: Mindmap) {
$assert(mindmap && mindmap.getBranches, 'mindmap can not be null'); $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 */ /** @return {String} the url attribute value */
getUrl() { getUrl():string {
return this.getAttribute('url'); return this.getAttribute('url');
} }

View File

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

View File

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

View File

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