) {
return (
<>
{this.renderChildren()}
>
);
}
getDirection(): LayoutDirection {
return this.props.positioning === Positioning.Vertical
? LayoutDirection.Vertical
: LayoutDirection.Horizontal;
}
getPageView() {
let height = 0;
const snapRows = getCanvasSnapRows(
this.props.bottomRow,
this.props.mobileBottomRow,
this.props.isMobile,
this.props.appPositioningType === AppPositioningTypes.AUTO,
);
height = snapRows * GridDefaults.DEFAULT_GRID_ROW_HEIGHT;
const style: CSSProperties = {
width: "100%",
height: this.props.isListWidgetCanvas ? "auto" : `${height}px`,
background: "none",
position: "relative",
};
// This div is the DropTargetComponent alternative for the page view
// DropTargetComponent and this div are responsible for the canvas height
return (
{this.renderAsContainerComponent(this.getCanvasProps())}
);
}
getWidgetView() {
//ToDo(Ashok): Make sure Layout Factory takes care of render mode based widget view.
// untill then this part of the widget will have a abstraction leak.
if (!this.props.dropDisabled && this.props.renderMode === "CANVAS") {
return this.renderAsDropTarget();
}
return this.getPageView();
}
static getDerivedPropertiesMap(): DerivedPropertiesMap {
return {};
}
static getDefaultPropertiesMap(): Record {
return {};
}
// TODO Find a way to enforce this, (dont let it be set)
static getMetaPropertiesMap(): Record {
return {};
}
}
export default CanvasWidget;