blob: 5f04bab64f32e3f6c2ccaf68b7e5f98a995af59e [file] [log] [blame]
var TextExpressionInterface = (function(){
return function(elem){
var _prevValue, _sourceText;
function _thisLayerFunction(){
}
Object.defineProperty(_thisLayerFunction, "sourceText", {
get: function(){
var stringValue = elem.textProperty.currentData.t;
if(stringValue !== _prevValue) {
elem.textProperty.currentData.t = _prevValue;
_sourceText = new String(stringValue);
//If stringValue is an empty string, eval returns undefined, so it has to be returned as a String primitive
_sourceText.value = stringValue ? stringValue : new String(stringValue);
}
return _sourceText;
}
});
return _thisLayerFunction;
};
}());