EditTextOperation
public struct EditTextOperation : DrawingOperation
Edit the text of a TextShape. Undoing sets the text back to the original
value.
If this operation immediately follows an AddShapeOperation for the exact
same text shape, and originalText is empty, then this operation declines to
be added to the undo stack and instead causes the AddShapeOperation to simply
add the shape with the new text value. This means that we avoid having an
“add empty text shape” operation in the undo stack.
-
Declaration
Swift
public init( shape: TextShape, originalText: String, text: String) -
Declaration
Swift
public func shouldAdd(to operationStack: DrawingOperationStack) -> Bool -
Declaration
Swift
public func apply(drawing: Drawing) -
Declaration
Swift
public func revert(drawing: Drawing)
View on GitHub
EditTextOperation Structure Reference