This project is archived and is in readonly mode.

#1097 ✓wontfix
Aeron Glemann

Improvement to Morph

Reported by Aeron Glemann | November 22nd, 2010 @ 02:45 PM

I love Mootools morphing, it's great being able to separate presentation from Javascript behavior and allow the designers to tweak animations without touching code. There are some things I would like to see improved.

At the moment Mootools parses stylesheets from the document and builds an internal cache of CSS classes and rules to use for animating. There are some setbacks to this:

  • Can't parse stylesheets outside of same domain restrictions (common with CDN's).
  • Doesn't parse stylesheets wrapped in @media calls (more common with tablets and mobile devices).
  • Can really only morph between single classes, not multiple classes or full CSS selectors (not required, but latter would be ideal).

What about a different approach:

  1. Create a temporary node using Slick with the morph selector.
  2. Get CSS rules from temporary node.
  3. Delete node.
  4. Morph target element between current rules and the ones parsed from the temporary node.

Seems a much simpler approach, less restrictions and more versatile too. If you'd be interested I can code up a proposal.

Comments and changes to this ticket

  • Christoph Pojer

    Christoph Pojer December 1st, 2010 @ 08:30 PM

    • State changed from “new” to “wontfix”

    I don't think we will extend Morph inside of MooTools to cover all of the above mentioned functionality. Given that this is a common enough use case I would love to see a MooTools Forge plugin for this and I would maybe even approve of adding such functionality to MooTools More :)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

Pages