summaryrefslogtreecommitdiff
path: root/tikzit/src/common/GraphChange.m
diff options
context:
space:
mode:
Diffstat (limited to 'tikzit/src/common/GraphChange.m')
-rw-r--r--tikzit/src/common/GraphChange.m10
1 files changed, 10 insertions, 0 deletions
diff --git a/tikzit/src/common/GraphChange.m b/tikzit/src/common/GraphChange.m
index 9707a19..c52a46d 100644
--- a/tikzit/src/common/GraphChange.m
+++ b/tikzit/src/common/GraphChange.m
@@ -90,6 +90,9 @@
inverse->affectedNodes = [affectedNodes retain];
[inverse setHorizontal:[self horizontal]];
break;
+ case EdgesReverse:
+ inverse->affectedEdges = [affectedEdges retain];
+ break;
case BoundingBoxChange:
inverse->oldBoundingBox = nwBoundingBox;
inverse->nwBoundingBox = oldBoundingBox;
@@ -197,6 +200,13 @@
return [gc autorelease];
}
++ (GraphChange*)reverseEdges:(NSSet*)es {
+ GraphChange *gc = [[GraphChange alloc] init];
+ [gc setChangeType:EdgesReverse];
+ [gc setAffectedEdges:es];
+ return [gc autorelease];
+}
+
+ (GraphChange*)changeBoundingBoxFrom:(NSRect)oldBB to:(NSRect)newBB {
GraphChange *gc = [[GraphChange alloc] init];
[gc setChangeType:BoundingBoxChange];