Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (item.prototype instanceof HTMLWidget || item.prototype instanceof SVGWidget) {
switch (item.prototype.constructor) {
case Text:
renderSmall(new Text().text("Hello\nand\nWelcome!"));
break;
case Shape:
renderIcon(new Shape());
break;
case FAChar:
renderIcon(new FAChar().char("\uf007"));
break;
case TextBox:
renderSmall(new TextBox().text("Hello\nand\nWelcome!"));
break;
case Icon:
renderIcon(new Icon().faChar("\uf007"));
renderIcon(new Icon()
.diameter(60)
.imageUrl("http://3.bp.blogspot.com/-OafJIIN-DDk/Twteb5onPkI/AAAAAAAAB3Q/vRaUgxkbgWc/s1600/The_Shmoo_by_zombiegoon.jpg")
);
break;
case Image:
renderSmall(new Image()
.source("http://3.bp.blogspot.com/-OafJIIN-DDk/Twteb5onPkI/AAAAAAAAB3Q/vRaUgxkbgWc/s1600/The_Shmoo_by_zombiegoon.jpg")
.sizing("fit")
.lockAspectRatio(false)
);
break;
case List:
renderSmall(new List()
.data(menuList)
);
.data(data.ND.subjects.data)
)
));
break;
case Modal:
render(new Modal()
.widget(new Pie()
.columns(data.TwoD.subjects.columns)
.data(data.TwoD.subjects.data)
)
);
break;
case Popup:
render(new Popup()
.widget(new Surface()
.widget(new Icon()
.faChar("\uF007")
)
)
);
break;
case Tabbed:
render(new Tabbed()
.addTab(new Pie()
.columns(data.TwoD.subjects.columns)
.data(data.TwoD.subjects.data)
, "Pie Chart", true)
.addTab(
new Line()
.columns(data.ND.subjects.columns)
.data(data.TwoD.subjects.data)
, "Line Chart")
switch (item.prototype.constructor) {
case Text:
renderSmall(new Text().text("Hello\nand\nWelcome!"));
break;
case Shape:
renderIcon(new Shape());
break;
case FAChar:
renderIcon(new FAChar().char("\uf007"));
break;
case TextBox:
renderSmall(new TextBox().text("Hello\nand\nWelcome!"));
break;
case Icon:
renderIcon(new Icon().faChar("\uf007"));
renderIcon(new Icon()
.diameter(60)
.imageUrl("http://3.bp.blogspot.com/-OafJIIN-DDk/Twteb5onPkI/AAAAAAAAB3Q/vRaUgxkbgWc/s1600/The_Shmoo_by_zombiegoon.jpg")
);
break;
case Image:
renderSmall(new Image()
.source("http://3.bp.blogspot.com/-OafJIIN-DDk/Twteb5onPkI/AAAAAAAAB3Q/vRaUgxkbgWc/s1600/The_Shmoo_by_zombiegoon.jpg")
.sizing("fit")
.lockAspectRatio(false)
);
break;
case List:
renderSmall(new List()
.data(menuList)
);
break;
constructor() {
super();
this._icon = new Icon();
this._textBox = new TextBox();
this._annotationWidgets = {};
this.pos({ x: undefined, y: undefined });
}
.each(function (_d, idx) {
context._annotationWidgets[idx] = new Icon()
.target(this)
.shape("square")
;
})
;