本文整理汇总了TypeScript中vs/base/browser/styleMutator.StyleMutator.setRight方法的典型用法代码示例。如果您正苦于以下问题:TypeScript StyleMutator.setRight方法的具体用法?TypeScript StyleMutator.setRight怎么用?TypeScript StyleMutator.setRight使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vs/base/browser/styleMutator.StyleMutator
的用法示例。
在下文中一共展示了StyleMutator.setRight方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: _renderWidget
private _renderWidget(widgetData: IWidgetData): void {
var _RESTORE_STYLE_TOP = 'data-editor-restoreStyleTop',
domNode = widgetData.widget.getDomNode();
if (widgetData.preference === null) {
if (domNode.hasAttribute(_RESTORE_STYLE_TOP)) {
var previousTop = domNode.getAttribute(_RESTORE_STYLE_TOP);
domNode.removeAttribute(_RESTORE_STYLE_TOP);
domNode.style.top = previousTop;
}
return;
}
if (widgetData.preference === OverlayWidgetPositionPreference.TOP_RIGHT_CORNER) {
if (!domNode.hasAttribute(_RESTORE_STYLE_TOP)) {
domNode.setAttribute(_RESTORE_STYLE_TOP, domNode.style.top);
}
StyleMutator.setTop(domNode, 0);
StyleMutator.setRight(domNode, (2 * this._verticalScrollbarWidth));
} else if (widgetData.preference === OverlayWidgetPositionPreference.BOTTOM_RIGHT_CORNER) {
if (!domNode.hasAttribute(_RESTORE_STYLE_TOP)) {
domNode.setAttribute(_RESTORE_STYLE_TOP, domNode.style.top);
}
var widgetHeight = domNode.clientHeight;
StyleMutator.setTop(domNode, (this._editorHeight - widgetHeight - 2 * this._horizontalScrollbarHeight));
StyleMutator.setRight(domNode, (2 * this._verticalScrollbarWidth));
} else if (widgetData.preference === OverlayWidgetPositionPreference.TOP_CENTER) {
if (!domNode.hasAttribute(_RESTORE_STYLE_TOP)) {
domNode.setAttribute(_RESTORE_STYLE_TOP, domNode.style.top);
}
StyleMutator.setTop(domNode, 0);
domNode.style.right = '50%';
}
}
示例2: _renderDomNode
protected _renderDomNode(largeSize: number, smallSize: number): void {
StyleMutator.setWidth(this.domNode, smallSize);
StyleMutator.setHeight(this.domNode, largeSize);
StyleMutator.setRight(this.domNode, 0);
StyleMutator.setTop(this.domNode, 0);
}