UNPKG

lazy-widgets

Version:

Typescript retained mode GUI for the HTML canvas API

28 lines 885 B
import { BareWidgetXMLInputConfig } from '../xml/BareWidgetXMLInputConfig.js'; import { Widget } from './Widget.js'; /** * A widget with empty space. * * Will always try to expand if the layout is constrained, so make sure to set * flex or pass it along the constructor * * @category Widget */ export class Spacing extends Widget { constructor(properties) { // default properties properties = Object.assign({ flex: 1 }, properties); // Spacing needs clear, never has children and doesn't propagate events super(properties); } handleResolveDimensions(minWidth, _maxWidth, minHeight, _maxHeight) { // Try to expand each axis this.idealWidth = minWidth; this.idealHeight = minHeight; } } Spacing.autoXML = { name: 'spacing', inputConfig: BareWidgetXMLInputConfig }; //# sourceMappingURL=Spacing.js.map