Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

small but missing stuff #5

Merged
merged 1 commit into from

2 participants

@oallouch

'tweenCSS3' and 'morphCSS3' properties added

@oallouch oallouch Update Source/Fx.CSS3.js
'tweenCSS3' and 'morphCSS3' properties added
0069212
@mcfedr mcfedr merged commit 849066c into mcfedr:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 12, 2012
  1. @oallouch

    Update Source/Fx.CSS3.js

    oallouch authored
    'tweenCSS3' and 'morphCSS3' properties added
This page is out of date. Refresh to see the latest.
Showing with 46 additions and 0 deletions.
  1. +46 −0 Source/Fx.CSS3.js
View
46 Source/Fx.CSS3.js
@@ -433,4 +433,50 @@ provides: [Fx.Tween.CSS3, Fx.Morph.CSS3, Fx.Elements.CSS3]
}
+})();
+
+/**
+ * 'tweenCSS3' and 'morphCSS3' properties
+ */
+(function() {
+ Element.Properties.tweenCSS3 = {
+ set: function(options){
+ this.get('tweenCSS3').cancel().setOptions(options);
+ return this;
+ },
+ get: function(){
+ var tween = this.retrieve('tweenCSS3');
+ if (!tween){
+ tween = new Fx.Tween.CSS3(this, {link: 'cancel'});
+ this.store('tweenCSS3', tween);
+ }
+ return tween;
+ }
+ };
+
+ Element.Properties.morphCSS3 = {
+ set: function(options){
+ this.get('morphCSS3').cancel().setOptions(options);
+ return this;
+ },
+ get: function(){
+ var morph = this.retrieve('morphCSS3');
+ if (!morph){
+ morph = new Fx.Morph.CSS3(this, {link: 'cancel'});
+ this.store('morphCSS3', morph);
+ }
+ return morph;
+ }
+
+ };
+ Element.implement({
+ tweenCSS3: function(property, from, to){
+ this.get('tweenCSS3').start(property, from, to);
+ return this;
+ },
+ morphCSS3: function(props){
+ this.get('morphCSS3').start(props);
+ return this;
+ }
+ });
})();
Something went wrong with that request. Please try again.