Skip to content

Commit

Permalink
Handing not-numeric x,y properties in point attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeniy-polyakov committed Mar 4, 2019
1 parent d867a22 commit 91649c5
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions dist/pixi-inspector.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/pixi-inspector.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/pixi-inspector.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/pixi-inspector.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pixi-inspector",
"description": "Browsing and changing attributes of PixiJS display objects in DOM inspector.",
"version": "1.0.4",
"version": "1.0.5",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions src/attributes/PointAttributeParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export class PointAttributeParser implements AttributeParser<{ x: number, y: num

stringify(value: { x: number, y: number }): string {
if (value) {
let x = (value.x || 0).toFixed(this.numberPrecision);
let y = (value.y || 0).toFixed(this.numberPrecision);
let x = Number(value.x || 0).toFixed(this.numberPrecision);
let y = Number(value.y || 0).toFixed(this.numberPrecision);
return x == y ? x : x + ',' + y;
}
return '';
Expand Down

0 comments on commit 91649c5

Please sign in to comment.