New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

phosphor-splitpanel

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

phosphor-splitpanel

A Phosphor layout panel which arranges its children into resizable sections.

  • 1.0.0-rc.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

phosphor-splitpanel

Build Status Coverage Status

A Phosphor layout panel which arranges its children into resizable sections.

API Docs

Package Install

Prerequisites

  • node
npm install --save phosphor-splitpanel

Source Build

Prerequisites

git clone https://github.com/phosphorjs/phosphor-splitpanel.git
cd phosphor-splitpanel
npm install

Rebuild

npm run clean
npm run build

Run Tests

Follow the source build instructions first.

# run tests in Firefox
npm test

# run tests in Chrome
npm run test:chrome

# run tests in IE
npm run test:ie

Build Docs

Follow the source build instructions first.

npm run docs

Navigate to docs/index.html.

Build Example

Follow the source build instructions first.

npm run build:example

Navigate to example/index.html.

Supported Runtimes

The runtime versions which are currently known to work are listed below. Earlier versions may also work, but come with no guarantees.

  • IE 11+
  • Firefox 32+
  • Chrome 38+

Bundle for the Browser

Follow the package install instructions first.

npm install --save-dev browserify browserify-css
browserify myapp.js -o mybundle.js

Usage Examples

Note: This module is fully compatible with Node/Babel/ES6/ES5. Simply omit the type declarations when using a language other than TypeScript.

import {
  SplitPanel
} from 'phosphor-splitpanel';

import {
  Widget
} from 'phosphor-widget';


// Create some content for the panel.
let w1 = new Widget();
let w2 = new Widget();
let w3 = new Widget();

// Set the widget stretch factors (optional).
SplitPanel.setStretch(w1, 0);
SplitPanel.setStretch(w2, 2);
SplitPanel.setStretch(w3, 1);

// Setup the split panel.
let panel = new SplitPanel();
panel.handleSize = 5;
panel.orientation = SplitPanel.Horizontal;
panel.addChild(w1);
panel.addChild(w2);
panel.addChild(w3);

// sometime later...

// Get the normalized relative widget sizes.
let sizes = panel.sizes();

// Set the relative widget sizes.
panel.setSizes([2, 4, 1]);

Keywords

FAQs

Package last updated on 31 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc