当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript Builder.size方法代码示例

本文整理汇总了TypeScript中vs/base/browser/builder.Builder.size方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Builder.size方法的具体用法?TypeScript Builder.size怎么用?TypeScript Builder.size使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在vs/base/browser/builder.Builder的用法示例。


在下文中一共展示了Builder.size方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: layout

	public layout(dimension: Dimension): Dimension[] {
		const { width, height } = dimension;

		// Return the applied sizes to title and content
		const sizes: Dimension[] = [];

		// Title Size: Width (Fill), Height (Variable)
		let titleSize: Dimension;
		if (this.options && this.options.hasTitle) {
			titleSize = new Dimension(width, Math.min(height, TITLE_HEIGHT));
		} else {
			titleSize = new Dimension(0, 0);
		}

		// Content Size: Width (Fill), Height (Variable)
		const contentSize = new Dimension(width, height - titleSize.height);

		if (this.options && typeof this.options.borderWidth === 'function') {
			contentSize.width -= this.options.borderWidth(); // adjust for border size
		}

		sizes.push(titleSize);
		sizes.push(contentSize);

		// Content
		if (this.contentArea) {
			this.contentArea.size(contentSize.width, contentSize.height);
		}

		return sizes;
	}
开发者ID:AlexxNica,项目名称:sqlopsstudio,代码行数:31,代码来源:part.ts

示例2: layout

	public layout(dimension: Dimension): void {

		// Pass on to Binary Container
		this.binaryContainer.size(dimension.width, dimension.height);
		this.scrollbar.scanDomNode();
		if (this.resourceViewerContext) {
			this.resourceViewerContext.layout(dimension);
		}
	}
开发者ID:costincaraivan,项目名称:vscode,代码行数:9,代码来源:binaryEditor.ts

示例3: layout

	public layout(dimension: Dimension): Dimension[] {
		if (!this.containerStyle) {
			this.computeStyle();
		}

		let width = dimension.width - (this.containerStyle.borderLeftWidth + this.containerStyle.borderRightWidth);
		let height = dimension.height - (this.containerStyle.borderTopWidth + this.containerStyle.borderBottomWidth);

		// Return the applied sizes to title, content and status
		let sizes: Dimension[] = [];

		// Title Size: Width (Fill), Height (Variable)
		let titleSize: Dimension;
		if (this.titleArea && this.titleStyle.display !== 'none') {
			titleSize = new Dimension(width, Math.min(height, this.titleStyle.height));
		} else {
			titleSize = new Dimension(0, 0);
		}

		// Status Size: Width (Fill), Height (Variable)
		let statusSize: Dimension;
		if (this.statusArea && this.statusStyle.display !== 'none') {
			this.statusArea.getHTMLElement().style.height = this.statusArea.getHTMLElement().style.width = '';
			statusSize = new Dimension(width, Math.min(height - titleSize.height, this.statusStyle.height));
		} else {
			statusSize = new Dimension(0, 0);
		}

		// Content Size: Width (Fill), Height (Variable)
		let contentSize = new Dimension(width, height - titleSize.height - statusSize.height);

		sizes.push(titleSize);
		sizes.push(contentSize);
		sizes.push(statusSize);

		// Content
		if (this.contentArea) {
			this.contentArea.size(contentSize.width, contentSize.height);
		}

		return sizes;
	}
开发者ID:StateFarmIns,项目名称:vscode,代码行数:42,代码来源:part.ts


注:本文中的vs/base/browser/builder.Builder.size方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。