本文整理匯總了TypeScript中vs/base/browser/styleMutator.StyleMutator.setTransform方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript StyleMutator.setTransform方法的具體用法?TypeScript StyleMutator.setTransform怎麽用?TypeScript StyleMutator.setTransform使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類vs/base/browser/styleMutator.StyleMutator
的用法示例。
在下文中一共展示了StyleMutator.setTransform方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: _updateSlider
protected _updateSlider(sliderSize: number, sliderPosition: number): void {
StyleMutator.setWidth(this.slider, sliderSize);
if (!this._forbidTranslate3dUse && Browser.canUseTranslate3d) {
StyleMutator.setTransform(this.slider, 'translate3d(' + sliderPosition + 'px, 0px, 0px)');
} else {
StyleMutator.setLeft(this.slider, sliderPosition);
}
}
示例2: render
public render(ctx: IRestrictedRenderingContext): void {
if (this._canUseTranslate3d) {
let transform = 'translate3d(0px, ' + ctx.linesViewportData.visibleRangesDeltaTop + 'px, 0px)';
StyleMutator.setTransform(this.domNode, transform);
StyleMutator.setTop(this.domNode, 0);
} else {
StyleMutator.setTransform(this.domNode, '');
StyleMutator.setTop(this.domNode, ctx.linesViewportData.visibleRangesDeltaTop);
}
let height = Math.min(this._layoutProvider.getTotalHeight(), 1000000);
StyleMutator.setHeight(this.domNode, height);
StyleMutator.setWidth(this.domNode, this._contentLeft);
this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft);
this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth);
this._glyphMarginBackgroundDomNode.setHeight(height);
}