forked from kaelzhang/neuron.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtween.js
More file actions
60 lines (37 loc) · 1.06 KB
/
tween.js
File metadata and controls
60 lines (37 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
var
Fx = require('./core'),
FxCSS = require('./css');
module.exports = NR.Class({
Extends: Fx,
Implements: FxCSS,
initialize: function(element, options){
var self = this;
// @type {Object}
self.element = self.subject = $(element);
Fx.call(self, options);
},
_set: function(now){
var self = this;
self._render(self.element, self.property, now, self.get('unit'));
return self;
},
start: function(property, from, to){
var self = this,
args,
parsed;
args = NR.makeArray(arguments);
if(!self.property){
self.property = args.shift();
}
parsed = this._prepare(self.element, self.property, args);
return Fx.prototype.start.call(self, parsed.from, parsed.to);
}
});
/**
change log:
2011-10-26 Kael
- migrate to Neuron
- remove chain methods of mootools
2011-10-19 Kael:
- refractor Fx.Tween, no longer inherit from Fx.CSS
*/