How to use the lively.graphics.Rectangle.inset function in lively

To help you get started, we’ve selected a few lively examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github LivelyKernel / lively.morphic / components / list.js View on Github external
exec: async (list) => {
      var preselect = list.selectedIndex || 0;
      var {selected} = await list.world().filterableListPrompt(
        "Select item", list.items,
        {preselect, requester: list.getWindow() || list, itemPadding: Rectangle.inset(0,2), multiSelect: true});
      if (selected.length) {
        if (list.multiSelect) list.selections = selected;
        else list.selection = selected[0];
        list.scrollSelectionIntoView();
        list.update();
      }
      return true;
    }
  },
github LivelyKernel / lively.morphic / ide / styling / style-editor.js View on Github external
build() {
    this.submorphs = [
      {
        type: "text",
        name: "html editor",
        textString: this.target.html,
        fontColor: Color.white,
        fontFamily: "Monaco, monospace",
        padding: Rectangle.inset(10, 10, 10, 2),
        fontSize: 14,
        fill: Color.transparent,
        extent: this.extent,
        clipMode: "auto"
      }
    ];
  }
github LivelyKernel / lively.morphic / components / prompts.js View on Github external
build(props = {}) {
    var {label} = props;
    this.addMorph({
      name: "label", type: "label", value: props.label,
      fill: null, padding: Rectangle.inset(3), fontSize: 14, fontColor: Color.gray
    });
    this.addMorph({
      name: "ok button", type: "button", label: "OK",
      ...this.okButtonStyle
    });
    connect(this.getSubmorphNamed("ok button"), 'fire', this, 'resolve');
    this.initLayout();
  }

lively

Express-like AWS Lamba framework

Apache-2.0
Latest version published 9 years ago

Package Health Score

40 / 100
Full package analysis