本文整理汇总了TypeScript中vs/editor/common/viewModel/viewModel.IViewLayout.changeWhitespace方法的典型用法代码示例。如果您正苦于以下问题:TypeScript IViewLayout.changeWhitespace方法的具体用法?TypeScript IViewLayout.changeWhitespace怎么用?TypeScript IViewLayout.changeWhitespace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vs/editor/common/viewModel/viewModel.IViewLayout
的用法示例。
在下文中一共展示了IViewLayout.changeWhitespace方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: _recomputeWhitespacesProps
private _recomputeWhitespacesProps(): boolean {
let hadAChange = false;
let keys = Object.keys(this._zones);
for (let i = 0, len = keys.length; i < len; i++) {
let id = keys[i];
let zone = this._zones[id];
let props = this._computeWhitespaceProps(zone.delegate);
if (this._viewLayout.changeWhitespace(parseInt(id, 10), props.afterViewLineNumber, props.heightInPx)) {
this._safeCallOnComputedHeight(zone.delegate, props.heightInPx);
hadAChange = true;
}
}
return hadAChange;
}
示例2: layoutZone
public layoutZone(id: number): boolean {
let changed = false;
if (this._zones.hasOwnProperty(id.toString())) {
let zone = this._zones[id.toString()];
let props = this._computeWhitespaceProps(zone.delegate);
// let newOrdinal = this._getZoneOrdinal(zone.delegate);
changed = this._viewLayout.changeWhitespace(zone.whitespaceId, props.afterViewLineNumber, props.heightInPx) || changed;
// TODO@Alex: change `newOrdinal` too
if (changed) {
this._safeCallOnComputedHeight(zone.delegate, props.heightInPx);
this.setShouldRender();
}
}
return changed;
}