Skip to content

Commit

Permalink
fix return value of pv.Viewer.quality
Browse files Browse the repository at this point in the history
This closes issue #136
  • Loading branch information
biasmv committed Dec 19, 2015
1 parent 15f6ea0 commit 95a93d1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -343,25 +343,26 @@ Viewer.prototype = {
},

quality : function(qual) {
if (qual === undefined) {
return this._options.quality;
}
this._options.quality = qual;
if (qual === 'high') {
this._options.arcDetail = 4;
this._options.sphereDetail = 16;
this._options.splineDetail = 8;
return;
}
if (qual === 'medium') {
this._options.arcDetail = 2;
this._options.sphereDetail = 10;
this._options.splineDetail = 5;
return;
}
if (qual === 'low') {
this._options.arcDetail = 2;
this._options.sphereDetail = 8;
this._options.splineDetail = 3;
return;
}
return this._options.quality;
console.error('invalid quality argument', qual);
},

Expand Down

0 comments on commit 95a93d1

Please sign in to comment.