blob: 632ff7ac637be04003ae7b483cc1840708a7b2f7 [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(elem.textProperty.currentData.t !== _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;
};
}());