diff --git a/core-js/src/main/javascript/Executor.js b/core-js/src/main/javascript/Executor.js index 436aac04..00be08aa 100644 --- a/core-js/src/main/javascript/Executor.js +++ b/core-js/src/main/javascript/Executor.js @@ -33,7 +33,7 @@ core.Executor = new Class({ if(!isLoading){ this._pendingFunctions.forEach(function(item){ var result = item.fn.attempt(item.args, item.bind); - core.assert(result!=false, "execution failed"); + $assert(result!=false, "execution failed"); }); this._pendingFunctions=[]; } diff --git a/core-js/src/main/javascript/Monitor.js b/core-js/src/main/javascript/Monitor.js index c98f8e28..6f0f0b0a 100644 --- a/core-js/src/main/javascript/Monitor.js +++ b/core-js/src/main/javascript/Monitor.js @@ -18,8 +18,8 @@ core.Monitor = function(fadeElement, logContentElem) { - core.assert(fadeElement, "fadeElement can not be null"); - core.assert(logContentElem, "logContentElem can not be null"); + $assert(fadeElement, "fadeElement can not be null"); + $assert(logContentElem, "logContentElem can not be null"); this.pendingMessages = []; this.inProgress = false; diff --git a/core-js/src/main/javascript/Utils.js b/core-js/src/main/javascript/Utils.js index 3419b631..ef7d3bae 100644 --- a/core-js/src/main/javascript/Utils.js +++ b/core-js/src/main/javascript/Utils.js @@ -58,7 +58,7 @@ objects.extend = function(subClass, baseClass) { subClass.superClass = baseClass.prototype; }; -core.assert = function(assert, message) { +$assert = function(assert, message) { if (!assert) { var stack; try { diff --git a/mindplot/src/main/javascript/Board.js b/mindplot/src/main/javascript/Board.js index 3cd5e033..8423252e 100644 --- a/mindplot/src/main/javascript/Board.js +++ b/mindplot/src/main/javascript/Board.js @@ -18,7 +18,7 @@ mindplot.Board = new Class({ initialize : function(defaultHeight, referencePoint) { - core.assert(referencePoint, "referencePoint can not be null"); + $assert(referencePoint, "referencePoint can not be null"); this._defaultWidth = defaultHeight; this._entries = new mindplot.BidirectionalArray(); this._referencePoint = referencePoint; @@ -32,7 +32,7 @@ mindplot.Board = new Class({ var board = this._getBoard(position); var entry = board.lookupEntryByOrder(order); - core.assert(!entry.isAvailable(), 'Entry must not be available in order to be removed.Entry Order:' + order); + $assert(!entry.isAvailable(), 'Entry must not be available in order to be removed.Entry Order:' + order); entry.removeTopic(); board.update(entry); }, @@ -66,9 +66,9 @@ mindplot.BidirectionalArray = new Class({ }, get :function(index, sign) { - core.assert($defined(index), 'Illegal argument, index must be passed.'); + $assert($defined(index), 'Illegal argument, index must be passed.'); if ($defined(sign)) { - core.assert(index >= 0, 'Illegal absIndex value'); + $assert(index >= 0, 'Illegal absIndex value'); index = index * sign; } @@ -82,14 +82,14 @@ mindplot.BidirectionalArray = new Class({ }, set : function(index, elem) { - core.assert($defined(index), 'Illegal index value'); + $assert($defined(index), 'Illegal index value'); var array = (index >= 0) ? this._rightElem : this._leftElem; array[Math.abs(index)] = elem; }, length : function(index) { - core.assert($defined(index), 'Illegal index value'); + $assert($defined(index), 'Illegal index value'); return (index >= 0) ? this._rightElem.length : this._leftElem.length; }, diff --git a/mindplot/src/main/javascript/BoardEntry.js b/mindplot/src/main/javascript/BoardEntry.js index a7369371..1b15a63f 100644 --- a/mindplot/src/main/javascript/BoardEntry.js +++ b/mindplot/src/main/javascript/BoardEntry.js @@ -19,7 +19,7 @@ mindplot.BoardEntry = new Class({ initialize:function(lowerLimit, upperLimit, order) { if ($defined(lowerLimit) && $defined(upperLimit)) { - core.assert(lowerLimit < upperLimit, 'lowerLimit can not be greater that upperLimit'); + $assert(lowerLimit < upperLimit, 'lowerLimit can not be greater that upperLimit'); } this._upperLimit = upperLimit; this._lowerLimit = lowerLimit; @@ -42,8 +42,8 @@ mindplot.BoardEntry = new Class({ }, setUpperLimit : function(value) { - core.assert($defined(value), "upper limit can not be null"); - core.assert(!isNaN(value), "illegal value"); + $assert($defined(value), "upper limit can not be null"); + $assert(!isNaN(value), "illegal value"); this._upperLimit = value; }, @@ -56,8 +56,8 @@ mindplot.BoardEntry = new Class({ }, setLowerLimit : function(value) { - core.assert($defined(value), "upper limit can not be null"); - core.assert(!isNaN(value), "illegal value"); + $assert($defined(value), "upper limit can not be null"); + $assert(!isNaN(value), "illegal value"); this._lowerLimit = value; }, @@ -76,7 +76,7 @@ mindplot.BoardEntry = new Class({ removeTopic : function() { - core.assert(!this.isAvailable(), "Entry doesn't have a topic."); + $assert(!this.isAvailable(), "Entry doesn't have a topic."); var topic = this.getTopic(); this.setTopic(null); topic.setOrder(null); diff --git a/mindplot/src/main/javascript/CentralTopic.js b/mindplot/src/main/javascript/CentralTopic.js index 77166149..99b03897 100644 --- a/mindplot/src/main/javascript/CentralTopic.js +++ b/mindplot/src/main/javascript/CentralTopic.js @@ -18,7 +18,7 @@ mindplot.CentralTopic = function(model) { - core.assert(model, "Model can not be null"); + $assert(model, "Model can not be null"); this.setModel(model); mindplot.CentralTopic.superClass.initialize.call(this); this.__onLoad = true; diff --git a/mindplot/src/main/javascript/CentralTopicBoard.js b/mindplot/src/main/javascript/CentralTopicBoard.js index 77d10b2f..cbd49c68 100644 --- a/mindplot/src/main/javascript/CentralTopicBoard.js +++ b/mindplot/src/main/javascript/CentralTopicBoard.js @@ -31,8 +31,8 @@ mindplot.CentralTopicBoard = new Class({ }, positionateDragTopic : function(dragTopic) { - core.assert(dragTopic != null, 'dragTopic can not be null'); - core.assert(dragTopic.isDragTopic, 'dragTopic must be DragTopic instance'); + $assert(dragTopic != null, 'dragTopic can not be null'); + $assert(dragTopic.isDragTopic, 'dragTopic must be DragTopic instance'); // This node is a main topic node. Position var dragPos = dragTopic.getPosition(); diff --git a/mindplot/src/main/javascript/ConnectionLine.js b/mindplot/src/main/javascript/ConnectionLine.js index e43e3f98..7ebbc635 100644 --- a/mindplot/src/main/javascript/ConnectionLine.js +++ b/mindplot/src/main/javascript/ConnectionLine.js @@ -18,9 +18,9 @@ mindplot.ConnectionLine = new Class({ initialize:function(sourceNode, targetNode, lineType) { - core.assert(targetNode, 'parentNode node can not be null'); - core.assert(sourceNode, 'childNode node can not be null'); - core.assert(sourceNode != targetNode, 'Cilcular connection'); + $assert(targetNode, 'parentNode node can not be null'); + $assert(sourceNode, 'childNode node can not be null'); + $assert(sourceNode != targetNode, 'Cilcular connection'); this._targetTopic = targetNode; this._sourceTopic = sourceNode; diff --git a/mindplot/src/main/javascript/DesignerActionRunner.js b/mindplot/src/main/javascript/DesignerActionRunner.js index 0d9c4403..d7a20871 100644 --- a/mindplot/src/main/javascript/DesignerActionRunner.js +++ b/mindplot/src/main/javascript/DesignerActionRunner.js @@ -24,7 +24,7 @@ mindplot.DesignerActionRunner = new Class({ }, execute:function(command) { - core.assert(command, "command can not be null"); + $assert(command, "command can not be null"); // Execute action ... command.execute(this._context); @@ -86,7 +86,7 @@ mindplot.CommandContext = new Class({ this._designer._removeNode(topic); }, createTopic:function(model, isVisible) { - core.assert(model, "model can not be null"); + $assert(model, "model can not be null"); var topic = this._designer._nodeModelToNodeGraph(model, isVisible); return topic; @@ -103,7 +103,7 @@ mindplot.CommandContext = new Class({ topic.disconnect(this._designer._workspace); }, createRelationship:function(model) { - core.assert(model, "model cannot be null"); + $assert(model, "model cannot be null"); var relationship = this._designer.createRelationship(model); return relationship; }, diff --git a/mindplot/src/main/javascript/DesignerUndoManager.js b/mindplot/src/main/javascript/DesignerUndoManager.js index 13498179..91205e12 100644 --- a/mindplot/src/main/javascript/DesignerUndoManager.js +++ b/mindplot/src/main/javascript/DesignerUndoManager.js @@ -24,7 +24,7 @@ mindplot.DesignerUndoManager = new Class({ }, enqueue:function(command) { - core.assert(command, "Command can not be null"); + $assert(command, "Command can not be null"); var length = this._undoQueue.length; if (command.discartDuplicated && length > 0) { // Skip duplicated events ... diff --git a/mindplot/src/main/javascript/DragManager.js b/mindplot/src/main/javascript/DragManager.js index ff1a4c6b..95704413 100644 --- a/mindplot/src/main/javascript/DragManager.js +++ b/mindplot/src/main/javascript/DragManager.js @@ -112,7 +112,7 @@ mindplot.DragManager.prototype._buildMouseUpListener = function(workspace, node, var screen = workspace.getScreenManager(); var result = function(event) { - core.assert(dragNode.isDragTopic, 'dragNode must be an DragTopic'); + $assert(dragNode.isDragTopic, 'dragNode must be an DragTopic'); // Remove drag node from the workspace. var hasBeenDragged = dragNode._isInTheWorkspace; diff --git a/mindplot/src/main/javascript/DragPivot.js b/mindplot/src/main/javascript/DragPivot.js index debb2058..d121dff6 100644 --- a/mindplot/src/main/javascript/DragPivot.js +++ b/mindplot/src/main/javascript/DragPivot.js @@ -53,7 +53,7 @@ mindplot.DragPivot = new Class({ _redraw : function(pivotPosition) { // Update line position. - core.assert(this.getTargetTopic(), 'Illegal invocation. Target node can not be null'); + $assert(this.getTargetTopic(), 'Illegal invocation. Target node can not be null'); var pivotRect = this._getPivotRect(); var currentPivotPosition = pivotRect.getPosition(); @@ -187,9 +187,9 @@ mindplot.DragPivot = new Class({ }, connectTo : function(targetTopic) { - core.assert(!this._outgoingLine, 'Could not connect an already connected node'); - core.assert(targetTopic != this, 'Cilcular connection are not allowed'); - core.assert(targetTopic, 'parent can not be null'); + $assert(!this._outgoingLine, 'Could not connect an already connected node'); + $assert(targetTopic != this, 'Cilcular connection are not allowed'); + $assert(targetTopic, 'parent can not be null'); this._targetTopic = targetTopic; if (targetTopic.getType() == mindplot.NodeModel.CENTRAL_TOPIC_TYPE) { @@ -217,8 +217,8 @@ mindplot.DragPivot = new Class({ }, disconnect : function(workspace) { - core.assert(workspace, 'workspace can not be null.'); - core.assert(this._targetTopic, 'There are not connected topic.'); + $assert(workspace, 'workspace can not be null.'); + $assert(this._targetTopic, 'There are not connected topic.'); this.setVisibility(false); this._targetTopic = null; diff --git a/mindplot/src/main/javascript/DragTopic.js b/mindplot/src/main/javascript/DragTopic.js index 884e026f..4df59e76 100644 --- a/mindplot/src/main/javascript/DragTopic.js +++ b/mindplot/src/main/javascript/DragTopic.js @@ -18,8 +18,8 @@ mindplot.DragTopic = function(dragShape, draggedNode) { - core.assert($defined(dragShape), 'Rect can not be null.'); - core.assert($defined(draggedNode), 'draggedNode can not be null.'); + $assert($defined(dragShape), 'Rect can not be null.'); + $assert($defined(draggedNode), 'draggedNode can not be null.'); this._elem2d = dragShape; this._order = null; @@ -68,7 +68,7 @@ mindplot.DragTopic.prototype.disconnect = function(workspace) mindplot.DragTopic.prototype.canBeConnectedTo = function(targetTopic) { - core.assert($defined(targetTopic), 'parent can not be null'); + $assert($defined(targetTopic), 'parent can not be null'); var result = true; if (!targetTopic.areChildrenShrinked() && !targetTopic.isCollapsed()) @@ -96,7 +96,7 @@ mindplot.DragTopic.prototype.canBeConnectedTo = function(targetTopic) mindplot.DragTopic.prototype.connectTo = function(parent) { - core.assert(parent, 'Parent connection node can not be null.'); + $assert(parent, 'Parent connection node can not be null.'); var dragPivot = this._getDragPivot(); dragPivot.connectTo(parent); @@ -156,7 +156,7 @@ mindplot.DragTopic.prototype.isDragTopic = function() mindplot.DragTopic.prototype.updateDraggedTopic = function(workspace) { - core.assert(workspace, 'workspace can not be null'); + $assert(workspace, 'workspace can not be null'); var dragPivot = this._getDragPivot(); var draggedTopic = this.getDraggedTopic(); @@ -212,7 +212,7 @@ mindplot.DragTopic.prototype.updateDraggedTopic = function(workspace) mindplot.DragTopic.prototype.setBoardPosition = function(point) { - core.assert(point, 'point can not be null'); + $assert(point, 'point can not be null'); var dragPivot = this._getDragPivot(); dragPivot.setPosition(point); }; @@ -220,7 +220,7 @@ mindplot.DragTopic.prototype.setBoardPosition = function(point) mindplot.DragTopic.prototype.getBoardPosition = function(point) { - core.assert(point, 'point can not be null'); + $assert(point, 'point can not be null'); var dragPivot = this._getDragPivot(); return dragPivot.getPosition(); }; diff --git a/mindplot/src/main/javascript/DragTopicPositioner.js b/mindplot/src/main/javascript/DragTopicPositioner.js index f921216e..db03af19 100644 --- a/mindplot/src/main/javascript/DragTopicPositioner.js +++ b/mindplot/src/main/javascript/DragTopicPositioner.js @@ -18,7 +18,7 @@ mindplot.DragTopicPositioner = new Class({ initialize:function(layoutManager) { - core.assert(layoutManager, 'layoutManager can not be null'); + $assert(layoutManager, 'layoutManager can not be null'); this._layoutManager = layoutManager; this._topics = layoutManager.getDesigner()._getTopics(); this._workspace = layoutManager.getDesigner().getWorkSpace(); diff --git a/mindplot/src/main/javascript/FixedDistanceBoard.js b/mindplot/src/main/javascript/FixedDistanceBoard.js index 5b9bab55..70cb950d 100644 --- a/mindplot/src/main/javascript/FixedDistanceBoard.js +++ b/mindplot/src/main/javascript/FixedDistanceBoard.js @@ -214,7 +214,7 @@ mindplot.FixedDistanceBoard = new Class({ removeTopic : function(topic) { var order = topic.getOrder(); var entry = this.lookupEntryByOrder(order); - core.assert(!entry.isAvailable(), "Illegal state"); + $assert(!entry.isAvailable(), "Illegal state"); entry.setTopic(null); topic.setOrder(null); @@ -245,7 +245,7 @@ mindplot.FixedDistanceBoard = new Class({ }, lookupEntryByPosition : function(pos) { - core.assert($defined(pos), 'position can not be null'); + $assert($defined(pos), 'position can not be null'); var entries = this._entries; var result = null; diff --git a/mindplot/src/main/javascript/IconModel.js b/mindplot/src/main/javascript/IconModel.js index 04cb0b04..7d633655 100644 --- a/mindplot/src/main/javascript/IconModel.js +++ b/mindplot/src/main/javascript/IconModel.js @@ -18,8 +18,8 @@ mindplot.IconModel = function(iconType, topic) { - core.assert(iconType, 'Icon id can not be null'); - core.assert(topic, 'topic can not be null'); + $assert(iconType, 'Icon id can not be null'); + $assert(topic, 'topic can not be null'); this._iconType = iconType; this._id = mindplot.IconModel._nextUUID(); this._topic = topic; diff --git a/mindplot/src/main/javascript/ImageIcon.js b/mindplot/src/main/javascript/ImageIcon.js index f3580179..af5a0fee 100644 --- a/mindplot/src/main/javascript/ImageIcon.js +++ b/mindplot/src/main/javascript/ImageIcon.js @@ -18,9 +18,9 @@ mindplot.ImageIcon = function(iconModel, topic, designer) { - core.assert(iconModel, 'iconModel can not be null'); - core.assert(topic, 'topic can not be null'); - core.assert(designer, 'designer can not be null'); + $assert(iconModel, 'iconModel can not be null'); + $assert(topic, 'topic can not be null'); + $assert(designer, 'designer can not be null'); this._topic = topic; this._iconModel = iconModel; this._designer = designer; @@ -99,7 +99,7 @@ mindplot.ImageIcon.prototype.getModel = function() { mindplot.ImageIcon.prototype._getNextFamilyIconId = function(iconId) { var familyIcons = this._getFamilyIcons(iconId); - core.assert(familyIcons != null, "Family Icon not found!"); + $assert(familyIcons != null, "Family Icon not found!"); var result = null; for (var i = 0; i < familyIcons.length && result == null; i++) @@ -120,8 +120,8 @@ mindplot.ImageIcon.prototype._getNextFamilyIconId = function(iconId) { }; mindplot.ImageIcon.prototype._getFamilyIcons = function(iconId) { - core.assert(iconId != null, "id must not be null"); - core.assert(iconId.indexOf("_") != -1, "Invalid icon id (it must contain '_')"); + $assert(iconId != null, "id must not be null"); + $assert(iconId.indexOf("_") != -1, "Invalid icon id (it must contain '_')"); var result = null; for (var i = 0; i < mindplot.ImageIcon.prototype.ICON_FAMILIES.length; i++) diff --git a/mindplot/src/main/javascript/LinkModel.js b/mindplot/src/main/javascript/LinkModel.js index d5fe0b4d..8a83cec3 100644 --- a/mindplot/src/main/javascript/LinkModel.js +++ b/mindplot/src/main/javascript/LinkModel.js @@ -18,8 +18,8 @@ mindplot.LinkModel = function(url, topic) { - core.assert(url, 'link url can not be null'); - core.assert(topic, 'mindmap can not be null'); + $assert(url, 'link url can not be null'); + $assert(topic, 'mindmap can not be null'); this._url = url; this._topic = topic; }; diff --git a/mindplot/src/main/javascript/MainTopic.js b/mindplot/src/main/javascript/MainTopic.js index db52b311..32b2be46 100644 --- a/mindplot/src/main/javascript/MainTopic.js +++ b/mindplot/src/main/javascript/MainTopic.js @@ -18,7 +18,7 @@ mindplot.MainTopic = function(model) { - core.assert(model, "Model can not be null"); + $assert(model, "Model can not be null"); this.setModel(model); mindplot.MainTopic.superClass.initialize.call(this); }; @@ -188,7 +188,7 @@ mindplot.MainTopic.prototype.setPosition = function(point, fireEvent) mindplot.MainTopic.prototype.workoutIncomingConnectionPoint = function(sourcePosition) { - core.assert(sourcePosition, 'sourcePoint can not be null'); + $assert(sourcePosition, 'sourcePoint can not be null'); var pos = this.getPosition(); var size = this.getSize(); @@ -217,7 +217,7 @@ mindplot.MainTopic.prototype.workoutIncomingConnectionPoint = function(sourcePos mindplot.MainTopic.prototype.workoutOutgoingConnectionPoint = function(targetPosition) { - core.assert(targetPosition, 'targetPoint can not be null'); + $assert(targetPosition, 'targetPoint can not be null'); var pos = this.getPosition(); var size = this.getSize(); diff --git a/mindplot/src/main/javascript/MainTopicBoard.js b/mindplot/src/main/javascript/MainTopicBoard.js index 65a6162a..16268849 100644 --- a/mindplot/src/main/javascript/MainTopicBoard.js +++ b/mindplot/src/main/javascript/MainTopicBoard.js @@ -44,8 +44,8 @@ mindplot.MainTopicBoard = new Class({ }, positionateDragTopic : function(dragTopic) { - core.assert(dragTopic != null, 'dragTopic can not be null'); - core.assert(dragTopic.isDragTopic, 'dragTopic must be DragTopic instance'); + $assert(dragTopic != null, 'dragTopic can not be null'); + $assert(dragTopic.isDragTopic, 'dragTopic must be DragTopic instance'); // This node is a main topic node. Position var dragPos = dragTopic.getPosition(); @@ -82,14 +82,14 @@ mindplot.MainTopicBoard = new Class({ * This x distance doesn't take into account the size of the shape. */ _workoutXBorderDistance : function(topic) { - core.assert(topic, 'topic can not be null'); + $assert(topic, 'topic can not be null'); var board = this._getBoard(); return board.workoutXBorderDistance(topic); }, addBranch : function(topic) { var order = topic.getOrder(); - core.assert($defined(order), "Order must be defined"); + $assert($defined(order), "Order must be defined"); // If the entry is not available, I must swap the the entries... var board = this._getBoard(); diff --git a/mindplot/src/main/javascript/Mindmap.js b/mindplot/src/main/javascript/Mindmap.js index 6e60e7fe..f1bdbfdd 100644 --- a/mindplot/src/main/javascript/Mindmap.js +++ b/mindplot/src/main/javascript/Mindmap.js @@ -52,12 +52,12 @@ mindplot.Mindmap = new Class({ }, addBranch : function(nodeModel) { - core.assert(nodeModel && nodeModel.isNodeModel(), 'Add node must be invoked with model objects'); + $assert(nodeModel && nodeModel.isNodeModel(), 'Add node must be invoked with model objects'); if (this._branches.length == 0) { - core.assert(nodeModel.getType() == mindplot.NodeModel.CENTRAL_TOPIC_TYPE, "First element must be the central topic"); + $assert(nodeModel.getType() == mindplot.NodeModel.CENTRAL_TOPIC_TYPE, "First element must be the central topic"); nodeModel.setPosition(0, 0); } else { - core.assert(nodeModel.getType() != mindplot.NodeModel.CENTRAL_TOPIC_TYPE, "Mindmaps only have one cental topic"); + $assert(nodeModel.getType() != mindplot.NodeModel.CENTRAL_TOPIC_TYPE, "Mindmaps only have one cental topic"); } this._branches.push(nodeModel); @@ -74,7 +74,7 @@ mindplot.Mindmap = new Class({ connect : function(parent, child) { // Child already has a parent ? var branches = this.getBranches(); - core.assert(!child.getParent(), 'Child model seems to be already connected'); + $assert(!child.getParent(), 'Child model seems to be already connected'); // Connect node... parent._appendChild(child); @@ -85,8 +85,8 @@ mindplot.Mindmap = new Class({ disconnect : function(child) { var parent = child.getParent(); - core.assert(child, 'Child can not be null.'); - core.assert(parent, 'Child model seems to be already connected'); + $assert(child, 'Child can not be null.'); + $assert(parent, 'Child model seems to be already connected'); parent._removeChild(child); @@ -109,19 +109,19 @@ mindplot.Mindmap = new Class({ }, createNode : function(type, id) { - core.assert(type, "node type can not be null"); + $assert(type, "node type can not be null"); return this._createNode(type, id); }, _createNode : function(type, id) { - core.assert(type, 'Node type must be specified.'); + $assert(type, 'Node type must be specified.'); var result = new mindplot.NodeModel(type, this, id); return result; }, createRelationship : function(fromNode, toNode) { - core.assert(fromNode, 'from node cannot be null'); - core.assert(toNode, 'to node cannot be null'); + $assert(fromNode, 'from node cannot be null'); + $assert(toNode, 'to node cannot be null'); return new mindplot.RelationshipModel(fromNode, toNode); }, diff --git a/mindplot/src/main/javascript/MindmapDesigner.js b/mindplot/src/main/javascript/MindmapDesigner.js index e17f0ec6..81aa0149 100644 --- a/mindplot/src/main/javascript/MindmapDesigner.js +++ b/mindplot/src/main/javascript/MindmapDesigner.js @@ -18,7 +18,7 @@ mindplot.MindmapDesigner = function(profile, divElement) { - core.assert($defined(profile.zoom), "zoom must be defined"); + $assert($defined(profile.zoom), "zoom must be defined"); // Undo manager ... this._actionRunner = new mindplot.DesignerActionRunner(this); @@ -163,7 +163,7 @@ mindplot.MindmapDesigner.prototype._buildNodeGraph = function(model) break; } } - core.assert(targetTopic, "Could not find a topic to connect"); + $assert(targetTopic, "Could not find a topic to connect"); topic.connectTo(targetTopic, workspace); } @@ -375,8 +375,8 @@ mindplot.MindmapDesigner.prototype.save = function(onSavedHandler, saveHistory) mindplot.MindmapDesigner.prototype.loadFromXML = function(mapId, xmlContent) { - core.assert(xmlContent, 'mindmapId can not be null'); - core.assert(xmlContent, 'xmlContent can not be null'); + $assert(xmlContent, 'mindmapId can not be null'); + $assert(xmlContent, 'xmlContent can not be null'); // Explorer Hack with local files ... var domDocument = core.Utils.createDocumentFromText(xmlContent); @@ -396,7 +396,7 @@ mindplot.MindmapDesigner.prototype.loadFromXML = function(mapId, xmlContent) mindplot.MindmapDesigner.prototype.load = function(mapId) { - core.assert(mapId, 'mapName can not be null'); + $assert(mapId, 'mapName can not be null'); // Build load function ... var persistantManager = mindplot.PersistanceManager; @@ -464,7 +464,7 @@ mindplot.MindmapDesigner.prototype.redo = function() mindplot.MindmapDesigner.prototype._nodeModelToNodeGraph = function(nodeModel, isVisible) { - core.assert(nodeModel, "Node model can not be null"); + $assert(nodeModel, "Node model can not be null"); var nodeGraph = this._buildNodeGraph(nodeModel); if($defined(isVisible)) @@ -487,7 +487,7 @@ mindplot.MindmapDesigner.prototype._nodeModelToNodeGraph = function(nodeModel, i }; mindplot.MindmapDesigner.prototype._relationshipModelToRelationship = function(model) { - core.assert(model, "Node model can not be null"); + $assert(model, "Node model can not be null"); var relationship = this._buildRelationship(model); var sourceTopic = relationship.getSourceTopic(); sourceTopic.addRelationship(relationship); diff --git a/mindplot/src/main/javascript/NodeGraph.js b/mindplot/src/main/javascript/NodeGraph.js index 914abfc8..5bc20d1e 100644 --- a/mindplot/src/main/javascript/NodeGraph.js +++ b/mindplot/src/main/javascript/NodeGraph.js @@ -47,7 +47,7 @@ mindplot.NodeGraph.prototype._set2DElement = function(elem2d) mindplot.NodeGraph.prototype.get2DElement = function() { - core.assert(this._elem2d, 'NodeGraph has not been initialized propertly'); + $assert(this._elem2d, 'NodeGraph has not been initialized propertly'); return this._elem2d; }; @@ -92,10 +92,10 @@ mindplot.NodeGraph.prototype.setSize = function(size) mindplot.NodeGraph.create = function(nodeModel) { - core.assert(nodeModel, 'Model can not be null'); + $assert(nodeModel, 'Model can not be null'); var type = nodeModel.getType(); - core.assert(type, 'Node model type can not be null'); + $assert(type, 'Node model type can not be null'); var result; if (type == mindplot.NodeModel.CENTRAL_TOPIC_TYPE) @@ -115,13 +115,13 @@ mindplot.NodeGraph.create = function(nodeModel) mindplot.NodeGraph.prototype.getModel = function() { - core.assert(this._model, 'Model has not been initialized yet'); + $assert(this._model, 'Model has not been initialized yet'); return this._model; }; mindplot.NodeGraph.prototype.setModel = function(model) { - core.assert(model, 'Model can not be null'); + $assert(model, 'Model can not be null'); this._model = model; }; @@ -167,7 +167,7 @@ mindplot.NodeGraph.prototype.createDragNode = function() mindplot.NodeGraph.prototype._buildDragShape = function() { - core.assert(false, '_buildDragShape must be implemented by all nodes.'); + $assert(false, '_buildDragShape must be implemented by all nodes.'); }; mindplot.NodeGraph.prototype.getPosition = function() diff --git a/mindplot/src/main/javascript/NodeModel.js b/mindplot/src/main/javascript/NodeModel.js index bb943fb5..4fac7e23 100644 --- a/mindplot/src/main/javascript/NodeModel.js +++ b/mindplot/src/main/javascript/NodeModel.js @@ -18,8 +18,8 @@ mindplot.NodeModel = new Class({ initialize:function(type, mindmap, id) { - core.assert(type, 'Node type can not be null'); - core.assert(mindmap, 'mindmap can not be null'); + $assert(type, 'Node type can not be null'); + $assert(mindmap, 'mindmap can not be null'); this._order = null; this._type = type; @@ -122,47 +122,47 @@ mindplot.NodeModel = new Class({ }, createLink : function(url) { - core.assert(url, 'Link URL must be specified.'); + $assert(url, 'Link URL must be specified.'); return new mindplot.LinkModel(url, this); }, addLink : function(link) { - core.assert(link && link.isLinkModel(), 'Only LinkModel can be appended to Mindmap object as links'); + $assert(link && link.isLinkModel(), 'Only LinkModel can be appended to Mindmap object as links'); this._links.push(link); }, _removeLink : function(link) { - core.assert(link && link.isLinkModel(), 'Only LinkModel can be appended to Mindmap object as links'); + $assert(link && link.isLinkModel(), 'Only LinkModel can be appended to Mindmap object as links'); this._links.erase(link); }, createNote : function(text) { - core.assert(text != null, 'note text must be specified.'); + $assert(text != null, 'note text must be specified.'); return new mindplot.NoteModel(text, this); }, addNote : function(note) { - core.assert(note && note.isNoteModel(), 'Only NoteModel can be appended to Mindmap object as links'); + $assert(note && note.isNoteModel(), 'Only NoteModel can be appended to Mindmap object as links'); this._notes.push(note); }, _removeNote : function(note) { - core.assert(note && note.isNoteModel(), 'Only NoteModel can be appended to Mindmap object as links'); + $assert(note && note.isNoteModel(), 'Only NoteModel can be appended to Mindmap object as links'); this._notes.erase(note); }, createIcon : function(iconType) { - core.assert(iconType, 'IconType must be specified.'); + $assert(iconType, 'IconType must be specified.'); return new mindplot.IconModel(iconType, this); }, addIcon : function(icon) { - core.assert(icon && icon.isIconModel(), 'Only IconModel can be appended to Mindmap object as icons'); + $assert(icon && icon.isIconModel(), 'Only IconModel can be appended to Mindmap object as icons'); this._icons.push(icon); }, _removeIcon : function(icon) { - core.assert(icon && icon.isIconModel(), 'Only IconModel can be appended to Mindmap object as icons'); + $assert(icon && icon.isIconModel(), 'Only IconModel can be appended to Mindmap object as icons'); this._icons.erase(icon); }, @@ -171,20 +171,20 @@ mindplot.NodeModel = new Class({ }, _appendChild : function(child) { - core.assert(child && child.isNodeModel(), 'Only NodeModel can be appended to Mindmap object'); + $assert(child && child.isNodeModel(), 'Only NodeModel can be appended to Mindmap object'); this._children.push(child); child._parent = this; }, _removeChild : function(child) { - core.assert(child && child.isNodeModel(), 'Only NodeModel can be appended to Mindmap object.'); + $assert(child && child.isNodeModel(), 'Only NodeModel can be appended to Mindmap object.'); this._children.erase(child); child._parent = null; }, setPosition : function(x, y) { - core.assert($defined(x), "x coordinate must be defined"); - core.assert($defined(y), "y coordinate must be defined"); + $assert($defined(x), "x coordinate must be defined"); + $assert($defined(y), "y coordinate must be defined"); if (!$defined(this._position)) { this._position = new core.Point(); @@ -198,8 +198,8 @@ mindplot.NodeModel = new Class({ }, setFinalPosition : function(x, y) { - core.assert($defined(x), "x coordinate must be defined"); - core.assert($defined(y), "y coordinate must be defined"); + $assert($defined(x), "x coordinate must be defined"); + $assert($defined(y), "y coordinate must be defined"); if (!$defined(this._finalPosition)) { this._finalPosition = new core.Point(); @@ -246,14 +246,14 @@ mindplot.NodeModel = new Class({ }, setParent : function(parent) { - core.assert(parent != this, 'The same node can not be parent and child if itself.'); + $assert(parent != this, 'The same node can not be parent and child if itself.'); this._parent = parent; }, canBeConnected : function(sourceModel, sourcePosition, targetTopicHeight) { - core.assert(sourceModel != this, 'The same node can not be parent and child if itself.'); - core.assert(sourcePosition, 'childPosition can not be null.'); - core.assert($defined(targetTopicHeight), 'childrenWidth can not be null.'); + $assert(sourceModel != this, 'The same node can not be parent and child if itself.'); + $assert(sourcePosition, 'childPosition can not be null.'); + $assert($defined(targetTopicHeight), 'childrenWidth can not be null.'); // Only can be connected if the node is in the left or rigth. var targetModel = this; diff --git a/mindplot/src/main/javascript/NoteModel.js b/mindplot/src/main/javascript/NoteModel.js index d5f5d057..1c0c94af 100644 --- a/mindplot/src/main/javascript/NoteModel.js +++ b/mindplot/src/main/javascript/NoteModel.js @@ -18,8 +18,8 @@ mindplot.NoteModel = new Class({ initialize : function(text, topic) { - core.assert(text != null, 'note text can not be null'); - core.assert(topic, 'mindmap can not be null'); + $assert(text != null, 'note text can not be null'); + $assert(topic, 'mindmap can not be null'); this._text = text; this._topic = topic; }, diff --git a/mindplot/src/main/javascript/PersistanceManager.js b/mindplot/src/main/javascript/PersistanceManager.js index cac0046d..bc0b8f00 100644 --- a/mindplot/src/main/javascript/PersistanceManager.js +++ b/mindplot/src/main/javascript/PersistanceManager.js @@ -20,8 +20,8 @@ mindplot.PersistanceManager = {}; mindplot.PersistanceManager.save = function(mindmap, editorProperties, onSavedHandler,saveHistory) { - core.assert(mindmap, "mindmap can not be null"); - core.assert(editorProperties, "editorProperties can not be null"); + $assert(mindmap, "mindmap can not be null"); + $assert(editorProperties, "editorProperties can not be null"); var mapId = mindmap.getId(); @@ -60,7 +60,7 @@ mindplot.PersistanceManager.save = function(mindmap, editorProperties, onSavedHa mindplot.PersistanceManager.load = function(mapId) { - core.assert(mapId, "mapId can not be null"); + $assert(mapId, "mapId can not be null"); var result = {r:null}; window.MapEditorService.loadMap(mapId, { diff --git a/mindplot/src/main/javascript/RelationshipModel.js b/mindplot/src/main/javascript/RelationshipModel.js index 490c1d7e..f1d7263c 100644 --- a/mindplot/src/main/javascript/RelationshipModel.js +++ b/mindplot/src/main/javascript/RelationshipModel.js @@ -17,8 +17,8 @@ */ mindplot.RelationshipModel = function(fromNode, toNode) { - core.assert(fromNode, 'from node type can not be null'); - core.assert(toNode, 'to node type can not be null'); + $assert(fromNode, 'from node type can not be null'); + $assert(toNode, 'to node type can not be null'); this._id = mindplot.RelationshipModel._nextUUID(); this._fromNode = fromNode; diff --git a/mindplot/src/main/javascript/ScreenManager.js b/mindplot/src/main/javascript/ScreenManager.js index a9e3a12f..a5220b7a 100644 --- a/mindplot/src/main/javascript/ScreenManager.js +++ b/mindplot/src/main/javascript/ScreenManager.js @@ -24,7 +24,7 @@ mindplot.ScreenManager = function(width, height, divElement) mindplot.ScreenManager.prototype.setScale = function(scale) { - core.assert($defined(scale), 'Screen scale can not be null'); + $assert($defined(scale), 'Screen scale can not be null'); this._workspaceScale = scale; }; diff --git a/mindplot/src/main/javascript/Topic.js b/mindplot/src/main/javascript/Topic.js index b2689caf..4e77ffe7 100644 --- a/mindplot/src/main/javascript/Topic.js +++ b/mindplot/src/main/javascript/Topic.js @@ -223,7 +223,7 @@ mindplot.Topic.prototype.buildShape = function(attributes, type) } else { - core.assert(false, "Unsupported figure type:" + type); + $assert(false, "Unsupported figure type:" + type); } result.setPosition(0, 0); @@ -1100,7 +1100,7 @@ mindplot.Topic.prototype.invariant = function() // Check consitency... if ((isConnected && !line) || (!isConnected && line)) { - // core.assert(false,'Illegal state exception.'); + // $assert(false,'Illegal state exception.'); } }; @@ -1151,8 +1151,8 @@ mindplot.Topic.prototype.removeEventListener = function(type, listener) mindplot.Topic.prototype._setSize = function(size) { - core.assert(size, "size can not be null"); - core.assert($defined(size.width), "size seem not to be a valid element"); + $assert(size, "size can not be null"); + $assert($defined(size.width), "size seem not to be a valid element"); mindplot.Topic.superClass.setSize.call(this, size); @@ -1180,7 +1180,7 @@ mindplot.Topic.prototype.setSize = function(size, force, updatePosition) }; mindplot.Topic.prototype._updatePositionOnChangeSize = function(oldSize, newSize, updatePosition) { - core.assert(false, "this method must be overided"); + $assert(false, "this method must be overided"); }; mindplot.Topic.prototype.disconnect = function(workspace) @@ -1188,7 +1188,7 @@ mindplot.Topic.prototype.disconnect = function(workspace) var outgoingLine = this.getOutgoingLine(); if ($defined(outgoingLine)) { - core.assert(workspace, 'workspace can not be null'); + $assert(workspace, 'workspace can not be null'); this._outgoingLine = null; @@ -1245,10 +1245,10 @@ mindplot.Topic.prototype.setOrder = function(value) mindplot.Topic.prototype.connectTo = function(targetTopic, workspace, isVisible) { - core.assert(!this._outgoingLine, 'Could not connect an already connected node'); - core.assert(targetTopic != this, 'Cilcular connection are not allowed'); - core.assert(targetTopic, 'Parent Graph can not be null'); - core.assert(workspace, 'Workspace can not be null'); + $assert(!this._outgoingLine, 'Could not connect an already connected node'); + $assert(targetTopic != this, 'Cilcular connection are not allowed'); + $assert(targetTopic, 'Parent Graph can not be null'); + $assert(workspace, 'Workspace can not be null'); // Connect Graphical Nodes ... targetTopic._appendChild(this); diff --git a/mindplot/src/main/javascript/TopicBoard.js b/mindplot/src/main/javascript/TopicBoard.js index 0b4a1e54..b7790479 100644 --- a/mindplot/src/main/javascript/TopicBoard.js +++ b/mindplot/src/main/javascript/TopicBoard.js @@ -27,7 +27,7 @@ mindplot.TopicBoard = new Class({ var board = this._getBoard(position); var entry = board.lookupEntryByOrder(order); - core.assert(!entry.isAvailable(), 'Entry must not be available in order to be removed.Entry Order:' + order); + $assert(!entry.isAvailable(), 'Entry must not be available in order to be removed.Entry Order:' + order); entry.removeTopic(); board.update(entry); }, diff --git a/mindplot/src/main/javascript/VariableDistanceBoard.js b/mindplot/src/main/javascript/VariableDistanceBoard.js index 97533159..cf80cd58 100644 --- a/mindplot/src/main/javascript/VariableDistanceBoard.js +++ b/mindplot/src/main/javascript/VariableDistanceBoard.js @@ -103,7 +103,7 @@ mindplot.VariableDistanceBoard = new Class({ }, lookupEntryByPosition:function(pos) { - core.assert($defined(pos), 'position can not be null'); + $assert($defined(pos), 'position can not be null'); var entries = this._entries; var zeroEntry = entries.get(0); if (zeroEntry.isCoordinateIn(pos.y)) { @@ -156,7 +156,7 @@ mindplot.VariableDistanceBoard = new Class({ }, update:function(entry) { - core.assert(entry, 'Entry can not be null'); + $assert(entry, 'Entry can not be null'); var order = entry.getOrder(); var index = this._orderToIndex(order); diff --git a/mindplot/src/main/javascript/Workspace.js b/mindplot/src/main/javascript/Workspace.js index e014b244..487eb110 100644 --- a/mindplot/src/main/javascript/Workspace.js +++ b/mindplot/src/main/javascript/Workspace.js @@ -19,7 +19,7 @@ mindplot.Workspace = new Class({ initialize: function(profile, screenManager, zoom) { // Create a suitable container ... - core.assert(screenManager, 'Div container can not be null'); + $assert(screenManager, 'Div container can not be null'); this._zoom = zoom; this._screenManager = screenManager; this._screenWidth = profile.width; diff --git a/mindplot/src/main/javascript/XMLMindmapSerializer_Beta.js b/mindplot/src/main/javascript/XMLMindmapSerializer_Beta.js index f1b3e37e..b530da16 100644 --- a/mindplot/src/main/javascript/XMLMindmapSerializer_Beta.js +++ b/mindplot/src/main/javascript/XMLMindmapSerializer_Beta.js @@ -21,7 +21,7 @@ mindplot.XMLMindmapSerializer_Beta = function() mindplot.XMLMindmapSerializer_Beta.prototype.toXML = function(mindmap) { - core.assert(mindmap, "Can not save a null mindmap"); + $assert(mindmap, "Can not save a null mindmap"); var document = core.Utils.createDocument(); @@ -179,11 +179,11 @@ mindplot.XMLMindmapSerializer_Beta.prototype._noteToXML = function(document, not mindplot.XMLMindmapSerializer_Beta.prototype.loadFromDom = function(dom) { - core.assert(dom, "Dom can not be null"); + $assert(dom, "Dom can not be null"); var rootElem = dom.documentElement; // Is a wisemap?. - core.assert(rootElem.tagName == mindplot.XMLMindmapSerializer_Beta.MAP_ROOT_NODE, "This seem not to be a map document."); + $assert(rootElem.tagName == mindplot.XMLMindmapSerializer_Beta.MAP_ROOT_NODE, "This seem not to be a map document."); // Start the loading process ... var mindmap = new mindplot.Mindmap(); @@ -281,7 +281,7 @@ mindplot.XMLMindmapSerializer_Beta.prototype._deserializeNode = function(domElem var child = children[i]; if (child.nodeType == 1) { - core.assert(child.tagName == "topic" || child.tagName == "icon" || child.tagName == "link" || child.tagName == "note", 'Illegal node type:' + child.tagName); + $assert(child.tagName == "topic" || child.tagName == "icon" || child.tagName == "link" || child.tagName == "note", 'Illegal node type:' + child.tagName); if (child.tagName == "topic") { var childTopic = this._deserializeNode(child, mindmap); childTopic.connectTo(topic); diff --git a/mindplot/src/main/javascript/XMLMindmapSerializer_Pela.js b/mindplot/src/main/javascript/XMLMindmapSerializer_Pela.js index 74188a74..20980e55 100644 --- a/mindplot/src/main/javascript/XMLMindmapSerializer_Pela.js +++ b/mindplot/src/main/javascript/XMLMindmapSerializer_Pela.js @@ -23,7 +23,7 @@ mindplot.XMLMindmapSerializer_Pela = function() mindplot.XMLMindmapSerializer_Pela.prototype.toXML = function(mindmap) { - core.assert(mindmap, "Can not save a null mindmap"); + $assert(mindmap, "Can not save a null mindmap"); var document = core.Utils.createDocument(); @@ -222,11 +222,11 @@ mindplot.XMLMindmapSerializer_Pela.prototype._relationshipToXML = function(docum mindplot.XMLMindmapSerializer_Pela.prototype.loadFromDom = function(dom) { - core.assert(dom, "Dom can not be null"); + $assert(dom, "Dom can not be null"); var rootElem = dom.documentElement; // Is a wisemap?. - core.assert(rootElem.tagName == mindplot.XMLMindmapSerializer_Pela.MAP_ROOT_NODE, "This seem not to be a map document."); + $assert(rootElem.tagName == mindplot.XMLMindmapSerializer_Pela.MAP_ROOT_NODE, "This seem not to be a map document."); this._idsMap = new Hash(); // Start the loading process ... @@ -350,7 +350,7 @@ mindplot.XMLMindmapSerializer_Pela.prototype._deserializeNode = function(domElem var child = children[i]; if (child.nodeType == 1) { - core.assert(child.tagName == "topic" || child.tagName == "icon" || child.tagName == "link" || child.tagName == "note", 'Illegal node type:' + child.tagName); + $assert(child.tagName == "topic" || child.tagName == "icon" || child.tagName == "link" || child.tagName == "note", 'Illegal node type:' + child.tagName); if (child.tagName == "topic") { var childTopic = this._deserializeNode(child, mindmap); childTopic.connectTo(topic); diff --git a/mindplot/src/main/javascript/commands/AddIconToTopicCommand.js b/mindplot/src/main/javascript/commands/AddIconToTopicCommand.js index 905f53eb..a6eb2dff 100644 --- a/mindplot/src/main/javascript/commands/AddIconToTopicCommand.js +++ b/mindplot/src/main/javascript/commands/AddIconToTopicCommand.js @@ -21,8 +21,8 @@ mindplot.commands.AddIconToTopicCommand = new Class( Extends:mindplot.Command, initialize: function(topicId, iconType) { - core.assert(topicId, 'topicId can not be null'); - core.assert(iconType, 'iconType can not be null'); + $assert(topicId, 'topicId can not be null'); + $assert(iconType, 'iconType can not be null'); this._selectedObjectsIds = topicId; this._iconType = iconType; }, diff --git a/mindplot/src/main/javascript/commands/AddLinkToTopicCommand.js b/mindplot/src/main/javascript/commands/AddLinkToTopicCommand.js index e3399fe9..408cd233 100644 --- a/mindplot/src/main/javascript/commands/AddLinkToTopicCommand.js +++ b/mindplot/src/main/javascript/commands/AddLinkToTopicCommand.js @@ -21,7 +21,7 @@ mindplot.commands.AddLinkToTopicCommand =new Class( Extends:mindplot.Command, initialize: function(topicId,url) { - core.assert(topicId, 'topicId can not be null'); + $assert(topicId, 'topicId can not be null'); this._selectedObjectsIds = topicId; this._url = url; this._id = mindplot.Command._nextUUID(); diff --git a/mindplot/src/main/javascript/commands/AddNoteToTopicCommand.js b/mindplot/src/main/javascript/commands/AddNoteToTopicCommand.js index 34b5e4d4..05bfe16b 100644 --- a/mindplot/src/main/javascript/commands/AddNoteToTopicCommand.js +++ b/mindplot/src/main/javascript/commands/AddNoteToTopicCommand.js @@ -21,7 +21,7 @@ mindplot.commands.AddNoteToTopicCommand = new Class( Extends:mindplot.Command, initialize: function(topicId,text) { - core.assert(topicId, 'topicId can not be null'); + $assert(topicId, 'topicId can not be null'); this._selectedObjectsIds = topicId; this._text = text; this._id = mindplot.Command._nextUUID(); diff --git a/mindplot/src/main/javascript/commands/AddRelationshipCommand.js b/mindplot/src/main/javascript/commands/AddRelationshipCommand.js index 9576354d..6b37b6c7 100644 --- a/mindplot/src/main/javascript/commands/AddRelationshipCommand.js +++ b/mindplot/src/main/javascript/commands/AddRelationshipCommand.js @@ -20,7 +20,7 @@ mindplot.commands.AddRelationshipCommand = new Class( Extends:mindplot.Command, initialize: function(model, mindmap) { - core.assert(model, 'Relationship model can not be null'); + $assert(model, 'Relationship model can not be null'); this._model = model; this._mindmap = mindmap; this._id = mindplot.Command._nextUUID(); diff --git a/mindplot/src/main/javascript/commands/AddTopicCommand.js b/mindplot/src/main/javascript/commands/AddTopicCommand.js index b07ef8ee..8c6877cc 100644 --- a/mindplot/src/main/javascript/commands/AddTopicCommand.js +++ b/mindplot/src/main/javascript/commands/AddTopicCommand.js @@ -21,7 +21,7 @@ mindplot.commands.AddTopicCommand = new Class( Extends:mindplot.Command, initialize: function(model, parentTopicId, animated) { - core.assert(model, 'Model can not be null'); + $assert(model, 'Model can not be null'); this._model = model; this._parentId = parentTopicId; this._id = mindplot.Command._nextUUID(); diff --git a/mindplot/src/main/javascript/commands/ChangeIconFromTopicCommand.js b/mindplot/src/main/javascript/commands/ChangeIconFromTopicCommand.js index 7ab81355..4b7ae24f 100644 --- a/mindplot/src/main/javascript/commands/ChangeIconFromTopicCommand.js +++ b/mindplot/src/main/javascript/commands/ChangeIconFromTopicCommand.js @@ -21,9 +21,9 @@ mindplot.commands.ChangeIconFromTopicCommand = new Class( Extends:mindplot.Command, initialize: function(topicId, iconId, iconType) { - core.assert(topicId, 'topicId can not be null'); - core.assert(iconId, 'iconId can not be null'); - core.assert(iconType, 'iconType can not be null'); + $assert(topicId, 'topicId can not be null'); + $assert(iconId, 'iconId can not be null'); + $assert(iconType, 'iconType can not be null'); this._selectedObjectsIds = topicId; this._iconModel = iconId; this._iconType = iconType; diff --git a/mindplot/src/main/javascript/commands/DeleteTopicCommand.js b/mindplot/src/main/javascript/commands/DeleteTopicCommand.js index 375e829b..6a7a3f33 100644 --- a/mindplot/src/main/javascript/commands/DeleteTopicCommand.js +++ b/mindplot/src/main/javascript/commands/DeleteTopicCommand.js @@ -21,7 +21,7 @@ mindplot.commands.DeleteTopicCommand = new Class( Extends:mindplot.Command, initialize: function(topicsIds) { - core.assert(topicsIds, "topicsIds must be defined"); + $assert(topicsIds, "topicsIds must be defined"); this._selectedObjectsIds = topicsIds; this._deletedTopicModels = []; this._parentTopicIds = []; diff --git a/mindplot/src/main/javascript/commands/DragTopicCommand.js b/mindplot/src/main/javascript/commands/DragTopicCommand.js index 456febe5..427773d3 100644 --- a/mindplot/src/main/javascript/commands/DragTopicCommand.js +++ b/mindplot/src/main/javascript/commands/DragTopicCommand.js @@ -21,7 +21,7 @@ mindplot.commands.DragTopicCommand = new Class( Extends:mindplot.Command, initialize: function(topicId) { - core.assert(topicId, "topicId must be defined"); + $assert(topicId, "topicId must be defined"); this._selectedObjectsIds = topicId; this._parentTopic = null; this._position = null; @@ -64,7 +64,7 @@ mindplot.commands.DragTopicCommand = new Class( } else { - core.assert("Illegal commnad state exception."); + $assert("Illegal commnad state exception."); } this._order = origOrder; this._position = origPosition; diff --git a/mindplot/src/main/javascript/commands/GenericFunctionCommand.js b/mindplot/src/main/javascript/commands/GenericFunctionCommand.js index c2f6e697..6b01287b 100644 --- a/mindplot/src/main/javascript/commands/GenericFunctionCommand.js +++ b/mindplot/src/main/javascript/commands/GenericFunctionCommand.js @@ -21,8 +21,8 @@ mindplot.commands.GenericFunctionCommand =new Class( Extends:mindplot.Command, initialize: function(commandFunc,value,topicsIds) { - core.assert(commandFunc, "commandFunc must be defined"); - core.assert(topicsIds, "topicsIds must be defined"); + $assert(commandFunc, "commandFunc must be defined"); + $assert(topicsIds, "topicsIds must be defined"); this._value = value; this._selectedObjectsIds = topicsIds; this._commandFunc = commandFunc; diff --git a/mindplot/src/main/javascript/commands/MoveControlPointCommand.js b/mindplot/src/main/javascript/commands/MoveControlPointCommand.js index b58753db..a5be49c8 100644 --- a/mindplot/src/main/javascript/commands/MoveControlPointCommand.js +++ b/mindplot/src/main/javascript/commands/MoveControlPointCommand.js @@ -20,7 +20,7 @@ mindplot.commands.MoveControlPointCommand = new Class( Extends:mindplot.Command, initialize: function(ctrlPointController, point) { - core.assert(ctrlPointController, 'line can not be null'); + $assert(ctrlPointController, 'line can not be null'); this._ctrlPointControler = ctrlPointController; this._line = ctrlPointController._line; var model = this._line.getModel(); diff --git a/mindplot/src/main/javascript/commands/RemoveIconFromTopicCommand.js b/mindplot/src/main/javascript/commands/RemoveIconFromTopicCommand.js index 84e016b5..344c7fa7 100644 --- a/mindplot/src/main/javascript/commands/RemoveIconFromTopicCommand.js +++ b/mindplot/src/main/javascript/commands/RemoveIconFromTopicCommand.js @@ -21,8 +21,8 @@ mindplot.commands.RemoveIconFromTopicCommand = new Class( Extends:mindplot.Command, initialize: function(topicId, iconModel) { - core.assert(topicId, 'topicId can not be null'); - core.assert(iconModel, 'iconId can not be null'); + $assert(topicId, 'topicId can not be null'); + $assert(iconModel, 'iconId can not be null'); this._selectedObjectsIds = topicId; this._iconModel = iconModel; }, diff --git a/mindplot/src/main/javascript/commands/RemoveLinkFromTopicCommand.js b/mindplot/src/main/javascript/commands/RemoveLinkFromTopicCommand.js index 3038c1d1..71e9cad0 100644 --- a/mindplot/src/main/javascript/commands/RemoveLinkFromTopicCommand.js +++ b/mindplot/src/main/javascript/commands/RemoveLinkFromTopicCommand.js @@ -21,7 +21,7 @@ mindplot.commands.RemoveLinkFromTopicCommand =new Class( Extends:mindplot.Command, initialize: function(topicId) { - core.assert(topicId, 'topicId can not be null'); + $assert(topicId, 'topicId can not be null'); this._selectedObjectsIds = topicId; }, execute: function(commandContext) diff --git a/mindplot/src/main/javascript/commands/RemoveNoteFromTopicCommand.js b/mindplot/src/main/javascript/commands/RemoveNoteFromTopicCommand.js index a1c55f43..8594719d 100644 --- a/mindplot/src/main/javascript/commands/RemoveNoteFromTopicCommand.js +++ b/mindplot/src/main/javascript/commands/RemoveNoteFromTopicCommand.js @@ -21,7 +21,7 @@ mindplot.commands.RemoveNoteFromTopicCommand = new Class( Extends:mindplot.Command, initialize: function(topicId) { - core.assert(topicId, 'topicId can not be null'); + $assert(topicId, 'topicId can not be null'); this._selectedObjectsIds = topicId; }, execute: function(commandContext) diff --git a/mindplot/src/main/javascript/layoutManagers/boards/Board.js b/mindplot/src/main/javascript/layoutManagers/boards/Board.js index 2e9a350e..92d2e649 100644 --- a/mindplot/src/main/javascript/layoutManagers/boards/Board.js +++ b/mindplot/src/main/javascript/layoutManagers/boards/Board.js @@ -14,16 +14,16 @@ mindplot.layoutManagers.boards.Board = new Class({ return mindplot.layoutManagers.boards.Board.NAME; }, removeTopicFromBoard:function(node, modifiedTopics){ - core.assert(false, "no Board implementation found!"); + $assert(false, "no Board implementation found!"); }, addBranch:function(node, modifiedTopics){ - core.assert(false, "no Board implementation found!"); + $assert(false, "no Board implementation found!"); }, updateChildrenPosition:function(node, modifiedTopics){ - core.assert(false, "no Board implementation found!"); + $assert(false, "no Board implementation found!"); }, setNodeMarginTop:function(node, delta){ - core.assert(false, "no Board implementation found!"); + $assert(false, "no Board implementation found!"); }, getNode:function(){ return this._node; diff --git a/mindplot/src/main/javascript/layoutManagers/boards/freeMindBoards/Board.js b/mindplot/src/main/javascript/layoutManagers/boards/freeMindBoards/Board.js index 9db4de27..ec4a39cf 100644 --- a/mindplot/src/main/javascript/layoutManagers/boards/freeMindBoards/Board.js +++ b/mindplot/src/main/javascript/layoutManagers/boards/freeMindBoards/Board.js @@ -9,17 +9,17 @@ mindplot.layoutManagers.boards.freeMindBoards.Board = mindplot.layoutManagers.bo this._positionTables = this._createTables(); }, _createTables:function(){ - core.assert(false, "no Board implementation found!") + $assert(false, "no Board implementation found!") }, _getTableForNode:function(node, position){ - core.assert(false, "no Board implementation found!") + $assert(false, "no Board implementation found!") }, removeTopicFromBoard:function(node, modifiedTopics){ var pos; if($defined(node._originalPosition)) pos = node._originalPosition; var result = this.findNodeEntryIndex(node, pos); - core.assert(result.index