Here is the example of Undo/Redo : Undo_Redo_Delete
I did the following steps :
TypeError: this.parent.getCanvas() is null
at this.parent.getCanvas().connectionLine.setGlow(false) of port.js.
If any body know how to overcome this problem then please help me.Thanks in advance:)
fixed with version 0.9.38
You can replace the onDragEnd method with the code below if you need a quick fix.
/**
* @inheritdoc
**/
onDragEnd:function()
{
this.parent.getCanvas().setSnapToGrid(this.originalSnapToGrid );
this.parent.getCanvas().setSnapToGeometry( this.originalSnapToGeometry );
// Don't call the parent implementation. This will create an CommandMove object
// and store them o the CommandStack for the undo operation. This makes no sense for a
// port.
// graphiti.shape.basic.Rectangle.prototype.onDragEnd.call(this); DON'T call the super implementation!!!
this.setAlpha(1.0);
// 1.) Restore the old Position of the node
//
this.setPosition(this.ox,this.oy);
// 2.) Remove the bounding line from the canvas
//
this.parent.getCanvas().hideConnectionLine();
this.isInDragDrop =false;
// Reset the drag&drop flyover information
//
this.currentTarget = null; // <<== this is the missing line to fix the bug
},