本文整理匯總了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;
}