TextItem content: Added coersion to string in content setter since 0 number is falsy but '0' string is not. Removed coersion from PathStructure example (introduced in 5637b3e37e4541c4e78180a168107be8282c136f line 64)

This commit is contained in:
Richard D. Worth 2011-06-30 09:12:14 -04:00
parent 4ea9f16bde
commit fdd62ed929
4 changed files with 4 additions and 4 deletions

View file

@ -5010,7 +5010,7 @@ var TextItem = this.TextItem = Item.extend({
setContent: function(content) {
this._changed(Change.CONTENT);
this._content = content;
this._content = '' + content;
},
getCharacterStyle: function() {

2
dist/paper.js vendored
View file

@ -5010,7 +5010,7 @@ var TextItem = this.TextItem = Item.extend({
setContent: function(content) {
this._changed(Change.CONTENT);
this._content = content;
this._content = '' + content;
},
getCharacterStyle: function() {

View file

@ -15,7 +15,7 @@
for (var i = 0; i < 3; i++) {
var text = new PointText();
text.content = '' + i;
text.content = i;
text.justification = 'center';
text.fontSize = 9;
segmentTexts.push(text);

View file

@ -80,7 +80,7 @@ var TextItem = this.TextItem = Item.extend(/** @lends TextItem# */{
setContent: function(content) {
this._changed(Change.CONTENT);
this._content = content;
this._content = '' + content;
},
/**