本文整理汇总了TypeScript中vs/editor/browser/editorBrowser.IOverlayWidget类的典型用法代码示例。如果您正苦于以下问题:TypeScript IOverlayWidget类的具体用法?TypeScript IOverlayWidget怎么用?TypeScript IOverlayWidget使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了IOverlayWidget类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: addWidget
public addWidget(widget: IOverlayWidget): void {
this._widgets[widget.getId()] = {
widget: widget,
preference: null
};
// This is sync because a widget wants to be in the dom
var domNode = widget.getDomNode();
domNode.style.position = 'absolute';
domNode.setAttribute('widgetId', widget.getId());
this.domNode.appendChild(domNode);
}
开发者ID:1424667164,项目名称:vscode,代码行数:12,代码来源:overlayWidgets.ts
示例2: addWidget
public addWidget(widget: IOverlayWidget): void {
const domNode = createFastDomNode(widget.getDomNode());
this._widgets[widget.getId()] = {
widget: widget,
preference: null,
domNode: domNode
};
// This is sync because a widget wants to be in the dom
domNode.setPosition('absolute');
domNode.setAttribute('widgetId', widget.getId());
this._domNode.domNode.appendChild(domNode.domNode);
this.setShouldRender();
}
开发者ID:yuit,项目名称:vscode,代码行数:16,代码来源:overlayWidgets.ts
示例3: removeWidget
public removeWidget(widget: IOverlayWidget): void {
var widgetId = widget.getId();
if (this._widgets.hasOwnProperty(widgetId)) {
var widgetData = this._widgets[widgetId];
var domNode = widgetData.widget.getDomNode();
delete this._widgets[widgetId];
domNode.parentNode.removeChild(domNode);
}
}
开发者ID:1424667164,项目名称:vscode,代码行数:10,代码来源:overlayWidgets.ts
示例4: setWidgetPosition
public setWidgetPosition(widget: IOverlayWidget, preference:OverlayWidgetPositionPreference): void {
var widgetData = this._widgets[widget.getId()];
widgetData.preference = preference;
this._requestModificationFrame(() => {
if(this._widgets.hasOwnProperty(widget.getId())) {
this._renderWidget(widgetData);
}
});
}
开发者ID:1424667164,项目名称:vscode,代码行数:10,代码来源:overlayWidgets.ts
示例5: setWidgetPosition
public setWidgetPosition(widget: IOverlayWidget, preference: OverlayWidgetPositionPreference): boolean {
let widgetData = this._widgets[widget.getId()];
if (widgetData.preference === preference) {
return false;
}
widgetData.preference = preference;
this.setShouldRender();
return true;
}
开发者ID:yuit,项目名称:vscode,代码行数:11,代码来源:overlayWidgets.ts
示例6: removeWidget
public removeWidget(widget: IOverlayWidget): void {
let widgetId = widget.getId();
if (this._widgets.hasOwnProperty(widgetId)) {
const widgetData = this._widgets[widgetId];
const domNode = widgetData.domNode.domNode;
delete this._widgets[widgetId];
domNode.parentNode.removeChild(domNode);
this.setShouldRender();
}
}
开发者ID:yuit,项目名称:vscode,代码行数:11,代码来源:overlayWidgets.ts
示例7: setWidgetPosition
public setWidgetPosition(widget: IOverlayWidget, preference:OverlayWidgetPositionPreference): boolean {
var widgetData = this._widgets[widget.getId()];
if (widgetData.preference === preference) {
return false;
}
widgetData.preference = preference;
this._requestModificationFrame(() => {
if(this._widgets.hasOwnProperty(widget.getId())) {
this._renderWidget(widgetData);
}
});
return true;
}
开发者ID:578723746,项目名称:vscode,代码行数:14,代码来源:overlayWidgets.ts
示例8:
this._requestModificationFrame(() => {
if(this._widgets.hasOwnProperty(widget.getId())) {
this._renderWidget(widgetData);
}
});
开发者ID:1424667164,项目名称:vscode,代码行数:5,代码来源:overlayWidgets.ts
注:本文中的vs/editor/browser/editorBrowser.IOverlayWidget类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论