Skip to content

Commit

Permalink
Deprecate shouldAdjustAnchorPointOnGestureStart on all plans.
Browse files Browse the repository at this point in the history
Summary: Closes #28

Reviewers: markwei, O2 Material Motion, O4 Material Motion Apple platform reviewers

Reviewed By: markwei, O2 Material Motion, O4 Material Motion Apple platform reviewers

Tags: #material_motion

Differential Revision: http://codereview.cc/D1909
  • Loading branch information
Jeff Verkoeyen committed Nov 15, 2016
1 parent 901f020 commit bc21bc2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 18 deletions.
13 changes: 7 additions & 6 deletions src/Draggable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ public final class Draggable: NSObject, Plan {
/** The gesture recognizer whose events will be observed. */
public let panGestureRecognizer: UIPanGestureRecognizer

/**
Whether or not the target's anchorPoint should be modified each time the gesture recognizer
begins.
*/
public var shouldAdjustAnchorPointOnGestureStart = false

/** Creates a plan with a new pan gesture recognizer. */
public convenience override init() {
self.init(withGestureRecognizer: UIPanGestureRecognizer())
Expand All @@ -57,6 +51,13 @@ public final class Draggable: NSObject, Plan {
draggable.shouldAdjustAnchorPointOnGestureStart = shouldAdjustAnchorPointOnGestureStart
return draggable
}

/**
Whether or not the target's anchorPoint should be modified each time the gesture recognizer
begins.
*/
@available(*, deprecated, message: "Emit a ChangeAnchorPoint plan instead. Deprecated in v1.1.0.")
public var shouldAdjustAnchorPointOnGestureStart = false
}

extension Draggable: Gesturable {
Expand Down
13 changes: 7 additions & 6 deletions src/Pinchable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ public final class Pinchable: NSObject, Plan {
/** The gesture recognizer whose events will be observed. */
public let pinchGestureRecognizer: UIPinchGestureRecognizer

/**
Whether or not the target's anchorPoint should be modified each time the gesture
recognizer begins.
*/
public var shouldAdjustAnchorPointOnGestureStart = true

/** Creates a plan with a new pinch gesture recognizer. */
public convenience override init() {
self.init(withGestureRecognizer: UIPinchGestureRecognizer())
Expand All @@ -58,6 +52,13 @@ public final class Pinchable: NSObject, Plan {
pinchable.shouldAdjustAnchorPointOnGestureStart = shouldAdjustAnchorPointOnGestureStart
return pinchable
}

/**
Whether or not the target's anchorPoint should be modified each time the gesture recognizer
begins.
*/
@available(*, deprecated, message: "Emit a ChangeAnchorPoint plan instead. Deprecated in v1.1.0.")
public var shouldAdjustAnchorPointOnGestureStart = true
}

extension Pinchable: Gesturable {
Expand Down
13 changes: 7 additions & 6 deletions src/Rotatable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ public final class Rotatable: NSObject, Plan {
/** The gesture recognizer whose events will be observed. */
public let rotationGestureRecognizer: UIRotationGestureRecognizer

/**
Whether or not the target's anchorPoint should be modified each time the gesture
recognizer begins.
*/
public var shouldAdjustAnchorPointOnGestureStart = true

/** Creates a plan with a new rotation gesture recognizer. */
public convenience override init() {
self.init(withGestureRecognizer: UIRotationGestureRecognizer())
Expand All @@ -57,6 +51,13 @@ public final class Rotatable: NSObject, Plan {
rotatable.shouldAdjustAnchorPointOnGestureStart = shouldAdjustAnchorPointOnGestureStart
return rotatable
}

/**
Whether or not the target's anchorPoint should be modified each time the gesture recognizer
begins.
*/
@available(*, deprecated, message: "Emit a ChangeAnchorPoint plan instead. Deprecated in v1.1.0.")
public var shouldAdjustAnchorPointOnGestureStart = true
}

extension Rotatable: Gesturable {
Expand Down

0 comments on commit bc21bc2

Please sign in to comment.