flymis/WebRoot/dojojs/src/widget/LayoutContainer.js

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/*
	Copyright (c) 2004-2006, The Dojo Foundation
	All Rights Reserved.

	Licensed under the Academic Free License version 2.1 or above OR the
	modified BSD license. For more information on Dojo licensing, see:

		http://dojotoolkit.org/community/licensing.shtml
*/

dojo.provide("dojo.widget.LayoutContainer");

dojo.require("dojo.widget.*");
dojo.require("dojo.widget.html.layout");

// summary
//	Provides Delphi-style panel layout semantics.
//
// details
//	A LayoutContainer is a box with a specified size (like style="width: 500px; height: 500px;"),
//	that contains children widgets marked with "layoutAlign" of "left", "right", "bottom", "top", and "client".
//	It takes it's children marked as left/top/bottom/right, and lays them out along the edges of the box,
//	and then it takes the child marked "client" and puts it into the remaining space in the middle.
//
//  Left/right positioning is similar to CSS's "float: left" and "float: right",
//	and top/bottom positioning would be similar to "float: top" and "float: bottom", if there were such
//	CSS.
//
//	Note that there can only be one client element, but there can be multiple left, right, top,
//	or bottom elements.
//
// usage
//	<style>
//		html, body{ height: 100%; width: 100%; }
//	</style>
//	<div dojoType="LayoutContainer" style="width: 100%; height: 100%">
//		<div dojoType="ContentPane" layoutAlign="top">header text</div>
//		<div dojoType="ContentPane" layoutAlign="left" style="width: 200px;">table of contents</div>
//		<div dojoType="ContentPane" layoutAlign="client">client area</div>
//	</div>
dojo.widget.defineWidget(
	"dojo.widget.LayoutContainer",
	dojo.widget.HtmlWidget,
{
	isContainer: true,

	// String
	//	- If the value is "top-bottom", then LayoutContainer will first position the "top" and "bottom" aligned elements,
	//	to and then put the left and right aligned elements in the remaining space, between the top and the bottom elements.
	//	It aligns the client element at the very end, in the remaining space.
	//
	//	- If the value is "left-right", then it first positions the "left" and "right" elements, and then puts the
	//	"top" and "bottom" elements in the remaining space, between the left and the right elements.
	//	It aligns the client element at the very end, in the remaining space.
	//
	//	- If the value is "none", then it will lay out each child in the natural order the children occur in.
	//	Basically each child is laid out into the "remaining space", where "remaining space" is initially
	//	the content area of this widget, but is reduced to a smaller rectangle each time a child is added.
	//	
	layoutChildPriority: 'top-bottom',
后面还有 37 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。