/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
/* eslint-env browser */ "use strict";
// A box with a start and a end pane, separated by a dragable splitter that // allows the user to resize the relative widths of the panes. // // +-----------------------+---------------------+ // | | | // | | | // | S | // | Start Pane p End Pane | // | l | // | i | // | t | // | t | // | e | // | r | // | | | // | | | // +-----------------------+---------------------+
class HSplitBox extends Component { static get propTypes() { return { // The contents of the start pane.
start: PropTypes.any.isRequired,
// The contents of the end pane.
end: PropTypes.any.isRequired,
// The relative width of the start pane, expressed as a number between 0 and // 1. The relative width of the end pane is 1 - startWidth. For example, // with startWidth = .5, both panes are of equal width; with startWidth = // .25, the start panel will take up 1/4 width and the end panel will take // up 3/4 width.
startWidth: PropTypes.number,
// A minimum css width value for the start and end panes.
minStartWidth: PropTypes.any,
minEndWidth: PropTypes.any,
// A callback fired when the user drags the splitter to resize the relative // pane widths. The function is passed the startWidth value that would put // the splitter underneath the users mouse.
onResize: PropTypes.func.isRequired,
};
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.