Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Derek Anderson committed Jan 21, 2018
1 parent bc225dd commit e3ad14a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion android/.idea/misc.xml

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

Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ static public int getColor(String colorString) {
alphaD = Double.parseDouble(colors[3]);
alphaD = 255/alphaD;
}

int alpha = (int)alphaD;

return Color.argb(175, red, blue, green);
Expand Down
16 changes: 13 additions & 3 deletions lib/platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,23 @@ import { RasterUtils } from './rasters/rasterutils';

class platform {
constructor() {
this.OS = RasterUtils.props.platform || get_browser().name.toLowerCase();
this.Version = RasterUtils.props.platform_version || get_browser().version;
this.isWeb = RasterUtils.props.platform ? false : true;
this.OS = (RasterUtils.props && RasterUtils.props.platform) || get_browser().name.toLowerCase();
this.Version = (RasterUtils.props && RasterUtils.props.platform_version) || get_browser().version;
this.isWeb = (RasterUtils.props && RasterUtils.props.platform) ? false : true;
}
}

function get_browser() {

// running in node most likely
if(typeof(navigator) == 'undefined') {
return {
name: 'nodejs',
version: 'shrug'
}
}

// looking for browser info
var ua = navigator.userAgent,
tem,
M =
Expand Down

0 comments on commit e3ad14a

Please sign in to comment.