How to use the lively.graphics.pt 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 / ide / text-editor.js View on Github external
relayout() {
    var {urlInput, loadButton, saveButton, removeButton, contentText} = this.ui;

    urlInput.width = contentText.width = this.width;
    urlInput.top = 0;
    urlInput.height = 20;
    var oneThird = this.width/3;
    loadButton.extent = saveButton.extent = removeButton.extent = pt(oneThird, 20);
    loadButton.topLeft = urlInput.bottomLeft;
    saveButton.topLeft = loadButton.topRight;
    removeButton.topLeft = saveButton.topRight;
    contentText.topLeft = loadButton.bottomLeft;
    contentText.height = this.height - loadButton.bottom;
  }
github LivelyKernel / lively.morphic / layout.js View on Github external
computeMinContainerExtent(spacing, container, layoutableSubmorphs) {
    var spacingWidth = (layoutableSubmorphs.length + 1) * spacing;
    var maxW = 0, maxH = 0;
    for (var i = 0; i < layoutableSubmorphs.length; i++) {
      let m = layoutableSubmorphs[i],
          {x: w, y: h} = m.extent;
      maxW += w;
      maxH = Math.max(h, maxH);
    }
    return pt(maxW + spacingWidth, maxH)
  }

lively

Express-like AWS Lamba framework

Apache-2.0
Latest version published 9 years ago

Package Health Score

40 / 100
Full package analysis