Skip to content

Commit

Permalink
Merge pull request #39 from jywarren/build-fix
Browse files Browse the repository at this point in the history
followup build fix, ugh
  • Loading branch information
jywarren authored Jun 21, 2016
2 parents 5bafc0d + 9a137c0 commit 96e124b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
17 changes: 11 additions & 6 deletions dist/spectral-workbench.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,16 @@ SpectralWorkbench.Image = Class.extend({

}

if (image.el) image.obj.src = image.options.url || image.el.attr('src');
else image.obj.src = image.options.url;
var src = image.options.url || image.el.attr('src');

// if there's no image, whether grabbed from the element, or supplied, just trigger onLoad callback already:
if (image.el.length === 0 && !image.options.url && image.options.hasOwnProperty('onLoad')) image.options.onLoad(image);
if (src) image.obj.src = src;
else {

// If there's no image, whether grabbed from the element
// or supplied, just trigger onLoad callback already
if (image.options.hasOwnProperty('onLoad')) image.options.onLoad(image);

}

/* ======================================
* Returns a array of pixel brightnesses in [r,g,b,a] format,
Expand Down Expand Up @@ -1352,8 +1357,8 @@ SpectralWorkbench.Spectrum = SpectralWorkbench.Datum.extend({

_spectrum[channel].forEach(function(point, i) {

if (point.y) point.y = +point.y.toPrecision(sigFigures);
if (point.x) point.x = +point.x.toPrecision(_spectrum.sigFigWavelength);
if (point.y && (point.y + '').length > sigFigures) point.y = +(point.y).toPrecision(sigFigures);
if (point.x && (point.x + '').length > _spectrum.sigFigWavelength) point.x = +(point.x).toPrecision(_spectrum.sigFigWavelength);

});

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "spectral-workbench",
"version": "0.1.2",
"version": "0.1.3",
"description": "Framework for spectrometric data management & analysis by Public Lab",
"main": "dist/spectral-workbench.js",
"scripts": {
Expand Down

0 comments on commit 96e124b

Please sign in to comment.