Preparing search index...

    Represents width and height dimensions.

    // Size represents a 2D dimension (width x height) in pixels.
    // Commonly used to configure the default and minimum size of a panel
    // via the PanelPlugin Descriptor.
    export class MyPanel extends PanelPlugin {
    static descriptor() {
    const d = new Descriptor();
    d.id = 'com.docs.MyPanel';
    d.name = 'My Panel';
    d.defaultDockState = DockState.Detached;
    // Panel opens at 400x300 and cannot be resized below 200x150.
    d.defaultSize = new Size(400, 300);
    d.minimumSize = new Size(200, 150);
    return d;
    }
    createWidget(parent: Widget): Widget {
    const root = new Widget(parent);
    const layout = new BoxLayout();
    layout.setDirection(Direction.TopToBottom);
    root.layout = layout;
    return root;
    }
    }
    Index

    Constructors

    Properties

    Constructors

    • Constructs a new Size object representing a two-dimensional size value with width and height.

      Parameters

      • width: number
      • height: number

      Returns Size

    Properties

    height: number

    Height component of the size.

    width: number

    Width component of the size.