forked from kaelzhang/neuron.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmorph.js
More file actions
67 lines (46 loc) · 1.22 KB
/
morph.js
File metadata and controls
67 lines (46 loc) · 1.22 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
61
62
63
64
65
66
67
var
Fx = require('./core'),
FxCSS = require('./css');
module.exports = NR.Class({
Extends: Fx,
Implements: FxCSS,
initialize: function(element, options){
this.element = this.subject = $(element);
Fx.call(this, options);
},
_set: function(now){
var self = this;
for (var p in now){
self._render(self.element, p, now[p], self.get('unit'));
}
return self;
},
_compute: function(from, to, delta){
var now = {},
p;
for (p in from){
now[p] = FxCSS._compute.call(this, from[p], to[p], delta);
}
return now;
},
start: function(properties){
var self = this;
var from = {}, to = {},
p,
parsed;
for (p in properties){
parsed = self._prepare(self.element, p, properties[p]);
from[p] = parsed.from;
to[p] = parsed.to;
}
return Fx.prototype.start.call(self, from, to);
}
});
/**
change log:
2012-02-08 Kael:
- major bug fixes
2011-10-26 Kael
- migrate to Neuron
- remove chain methods of mootools
*/