mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-07 13:22:07 -05:00
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:
parent
4ea9f16bde
commit
fdd62ed929
4 changed files with 4 additions and 4 deletions
2
dist/docs/resources/js/paper.js
vendored
2
dist/docs/resources/js/paper.js
vendored
|
@ -5010,7 +5010,7 @@ var TextItem = this.TextItem = Item.extend({
|
||||||
|
|
||||||
setContent: function(content) {
|
setContent: function(content) {
|
||||||
this._changed(Change.CONTENT);
|
this._changed(Change.CONTENT);
|
||||||
this._content = content;
|
this._content = '' + content;
|
||||||
},
|
},
|
||||||
|
|
||||||
getCharacterStyle: function() {
|
getCharacterStyle: function() {
|
||||||
|
|
2
dist/paper.js
vendored
2
dist/paper.js
vendored
|
@ -5010,7 +5010,7 @@ var TextItem = this.TextItem = Item.extend({
|
||||||
|
|
||||||
setContent: function(content) {
|
setContent: function(content) {
|
||||||
this._changed(Change.CONTENT);
|
this._changed(Change.CONTENT);
|
||||||
this._content = content;
|
this._content = '' + content;
|
||||||
},
|
},
|
||||||
|
|
||||||
getCharacterStyle: function() {
|
getCharacterStyle: function() {
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
for (var i = 0; i < 3; i++) {
|
for (var i = 0; i < 3; i++) {
|
||||||
var text = new PointText();
|
var text = new PointText();
|
||||||
text.content = '' + i;
|
text.content = i;
|
||||||
text.justification = 'center';
|
text.justification = 'center';
|
||||||
text.fontSize = 9;
|
text.fontSize = 9;
|
||||||
segmentTexts.push(text);
|
segmentTexts.push(text);
|
||||||
|
|
|
@ -80,7 +80,7 @@ var TextItem = this.TextItem = Item.extend(/** @lends TextItem# */{
|
||||||
|
|
||||||
setContent: function(content) {
|
setContent: function(content) {
|
||||||
this._changed(Change.CONTENT);
|
this._changed(Change.CONTENT);
|
||||||
this._content = content;
|
this._content = '' + content;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue