本文整理匯總了TypeScript中vs/editor/common/viewModel/viewModel.IViewLayout.addWhitespace方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript IViewLayout.addWhitespace方法的具體用法?TypeScript IViewLayout.addWhitespace怎麽用?TypeScript IViewLayout.addWhitespace使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類vs/editor/common/viewModel/viewModel.IViewLayout
的用法示例。
在下文中一共展示了IViewLayout.addWhitespace方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: addZone
public addZone(zone: IViewZone): number {
let props = this._computeWhitespaceProps(zone);
let whitespaceId = this._viewLayout.addWhitespace(props.afterViewLineNumber, this._getZoneOrdinal(zone), props.heightInPx);
let myZone: IMyViewZone = {
whitespaceId: whitespaceId,
delegate: zone,
isVisible: false,
domNode: createFastDomNode(zone.domNode),
marginDomNode: zone.marginDomNode ? createFastDomNode(zone.marginDomNode) : null
};
this._safeCallOnComputedHeight(myZone.delegate, props.heightInPx);
myZone.domNode.setPosition('absolute');
myZone.domNode.domNode.style.width = '100%';
myZone.domNode.setDisplay('none');
myZone.domNode.setAttribute('monaco-view-zone', myZone.whitespaceId.toString());
this.domNode.domNode.appendChild(myZone.domNode.domNode);
if (myZone.marginDomNode) {
myZone.marginDomNode.setPosition('absolute');
myZone.marginDomNode.domNode.style.width = '100%';
myZone.marginDomNode.setDisplay('none');
myZone.marginDomNode.setAttribute('monaco-view-zone', myZone.whitespaceId.toString());
this.marginDomNode.domNode.appendChild(myZone.marginDomNode.domNode);
}
this._zones[myZone.whitespaceId.toString()] = myZone;
this.setShouldRender();
return myZone.whitespaceId;
}