blob: 056b40b6aa15b263bf0f85d32e3b784909fa66cb [file] [log] [blame]
(function addDecorator() {
function searchExpressions() {
if(this.data.d.x) {
this.calculateExpression = ExpressionManager.initiateExpression.bind(this)(this.elem, this.data.d, this);
this.addEffect(this.getExpressionValue.bind(this));
return true;
}
}
TextProperty.prototype.getExpressionValue = function (currentValue, text) {
var newValue = this.calculateExpression(text);
if(currentValue.t !== newValue) {
var newData = {};
this.copyData(newData, currentValue);
newData.t = newValue.toString();
newData.__complete = false;
return newData;
}
return currentValue;
}
TextProperty.prototype.searchProperty = function () {
var isKeyframed = this.searchKeyframes();
var hasExpressions = this.searchExpressions();
this.kf = isKeyframed || hasExpressions;
return this.kf;
};
TextProperty.prototype.searchExpressions = searchExpressions;
}());