The mxEditor uses graph.isSwimlane(vertex) to check if a cell is a swimlane. This method checks the cell to make sure the parent is not the root and the cell is not an edge, and then returns true if the cell's current style (obtained from the cell's state) has a value for mxConstants.STYLE_SHAPE set to mxConstants.SHAPE_SWIMLANE. You can override this method globally by overriding the mxGraph.prototype.isSwimlane definition, or you can do it for your specific instance of an editor like this:
editor.graph.isSwimlane = function (cell)
{
// do some checking here and return true/false
// the original method can also be called like this:
return mxGraph.prototype.isSwimlane.apply(this, arguments);
};
answered
03 May '12, 10:43
Dave
24●3
accept rate:
0%