Merge pull request #358 from raiden-dev/master

[BACK_INCOMPAT] Change the way relative animations are specified.
This commit is contained in:
Juriy Zaytsev 2012-12-19 12:53:58 -08:00
commit 0326af39ca
4 changed files with 19 additions and 9 deletions

8
dist/all.js vendored
View file

@ -10039,14 +10039,18 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, {
_animate: function(property, to, options) {
var obj = this;
to = to.toString();
options || (options = { });
if (!('from' in options)) {
options.from = this.get(property);
}
if (/[+\-]/.test((to + '').charAt(0))) {
to = this.get(property) + parseFloat(to);
if (~to.indexOf('=')) {
to = this.get(property) + parseFloat(to.replace('=', ''));
}
else {
to = parseFloat(to);
}
fabric.util.animate({

12
dist/all.min.js vendored

File diff suppressed because one or more lines are too long

BIN
dist/all.min.js.gz vendored

Binary file not shown.

View file

@ -1592,14 +1592,18 @@
_animate: function(property, to, options) {
var obj = this;
to = to.toString();
options || (options = { });
if (!('from' in options)) {
options.from = this.get(property);
}
if (/[+\-]/.test((to + '').charAt(0))) {
to = this.get(property) + parseFloat(to);
if (~to.indexOf('=')) {
to = this.get(property) + parseFloat(to.replace('=', ''));
}
else {
to = parseFloat(to);
}
fabric.util.animate({