Skip to content

document changes from effects rewrite: #242

Closed
@mikesherov

Description

@mikesherov

deprecated

  • .effect("transfer") -> .transfer()
  • magic .show('size') which animated from 0 to to, which is now instead the same as .toggle('size') in that the to is the starting point and the original size is the endpoint.

new internals

  • all effects are :animated detectable.
  • $.fx.step.clip allows specifying an object rather than a string for clip values.

new api: $.effects

  • $.effects.define: for specifying a new effect.
  • $.effects.scaledDimensions: returns an object that has width / outerwidth measurements for an element scaled to a specified percent and direction.
  • $.effects.clipToBox: given a TRBL set of clip dimensions, returns a WHLT set of dimensions. Useful for animatin a placeholder element during a clip animation.
  • $.effects.unshift: considering that effects are not queued, if you're effect has multiple animations, queue them all up, and then unshift the number of animations you made to add them to the front of the queue. will not document in anticipation of using queueHooks.
  • $.effect.saveStyle: saves inline styles before an effect, so they can be restored automatically later.
  • $.effect.restoreStyle: restores the inline styles from before an effect that were last saved with $.effect.saveStyle.
  • $.effect.getBaseline: gets fractional values for a vanishing point on an element.
  • $.effect.createPlaceholder: in order to animate clip, the element needs to be absolute. This creates a placeholder element so that layout is not effected, and turns the original element absolute. Returns the placeholder, which can be undefined if none was created.
  • $.effect.removePlaceholder: removes a placeholder from an element. noop if the element has no placeholder.

Private

  • $.effect.cleanup: restores styles and removes placeholders from an element. Typically called at the end of an animation.
  • $.effect.mode: normalizes "show", "hide", "toggle", and "effect" to "show", "hide", "none", or "effect" given an element's current display state.

new api: $.fn

  • $.fn.cssClip: getter/setter for an object version of the css clip property.
  • $.fn.transfer: same as the .effect("transfer") method but no longer the rest of the effects semantics.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions