Overriding mxGraph.isCellSelectable is the general idea. For a specific suggestion, you could add a selectable style to all cells as follows:
mxGraph.prototype.isCellSelectable = function(cell)
{
var state = this.view.getState(cell);
var style = (state != null) ? state.style : this.getCellStyle(cell);
return this.isCellsSelectable() && !this.isCellLocked(cell) && style['selectable'] != 0;
};
And then use the selectable style as follows:
var v1 = graph.insertVertex(parent, null, 'Hello,', 20, 20, 80, 30, 'selectable=0');
answered
23 Aug '11, 05:35
Gaudenz
80.1k●1●3●10
accept rate:
39%