Minor tweaks to the meteor/non-core/bundle-visualizer package.

This commit is contained in:
Ben Newman
2017-05-11 13:15:57 -04:00
parent a5a3611de8
commit 4cd46ded3c
3 changed files with 7 additions and 9 deletions

View File

@@ -9,7 +9,7 @@ import * as classes from "./classNames.js";
import "./style.css";
Meteor.startup(() => {
import("./sunburst.js").then(({ Sunburst }) => main(Sunburst));
import("./sunburst.js").then(s => main(s.Sunburst));
});
function main(builder) {
@@ -29,7 +29,7 @@ function main(builder) {
// Load the JSON, which is `d3-hierarchy` digestible.
if (result) {
(new builder({ container })).loadJson(result);
new builder({ container }).loadJson(result);
}
});
}

View File

@@ -13,7 +13,7 @@ Npm.depends({
});
Package.onUse(function(api) {
api.versionsFrom('1.4.4.1');
api.use('isobuild:dynamic-import@1.5.0');
api.use([
'ecmascript',
'dynamic-import',

View File

@@ -59,12 +59,10 @@ const DEFAULT_COLORS = {
};
export class Sunburst {
constructor(
{
container,
colors = DEFAULT_COLORS,
} = {}
) {
constructor({
container,
colors = DEFAULT_COLORS,
} = {}) {
this.elements = {};
this.colors = colors;
this.totalSize = 0;