Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
break;
case List:
renderSmall(new List()
.data(menuList)
);
break;
case Menu:
renderMedium(new Menu()
.data(menuList)
);
break;
case Surface:
renderMedium(new Surface()
.title("Surface")
.menu(menuList)
.content(new Text()
.text("Hello\nand\nWelcome!")
));
break;
case ResizeSurface:
renderMedium(new ResizeSurface()
.title("Resize Me")
.menu(menuList)
.content(new Text()
.text("I\nam\nResizale!")
));
break;
case EntityCard:
renderMedium(new EntityCard()
.icon("")
.iconDiameter(28)
.iconPaddingPercent(0)
addLayer(widget, placement: LayerPlacement = "default", widthRatio: number = 1, heightRatio: number = 1) {
const widgets = this.widgets();
widgets.push(widget ? widget : new Text().text("No widget defined for layer."));
this.widgets(widgets);
this._widgetPlacements.push(placement);
this._widgetRatios.push([widthRatio, heightRatio]);
return this;
}
.each(function (this: SVGElement, d) {
context.textLocal.set(this, new Text().target(this));
});
dataTextEnter.merge(dataText as any)
addTab(widget, label, isActive?, callback?) {
const widgetSize = widget.size();
if (widgetSize.width === 0 && widgetSize.height === 0) {
widget.size({ width: "100%", height: "100%" });
}
const labels = this.labels();
const widgets = this.widgets();
if (isActive) {
this.activeTabIdx(this.widgets().length);
}
labels.push(label);
const surface = new Surface().widget(widget ? widget : new Text().text("No widget defined for tab"));
widgets.push(surface);
this.labels(labels);
this.widgets(widgets);
if (callback) {
callback(surface);
}
return this;
}