ScaleHeight

function ScaleHeight(coefficient: number = null): boolean

Description

Scales the height of the figure using the specified coefficient.

Parameters

coefficientnumberdefault: null

The coefficient by which the figure height will be scaled.

Returns

boolean

Try It

var oDocument = Api.GetDocument();
var oParagraph = oDocument.GetElement(0);
for (let i = 3; i > 0; i-- ){
   var oFill = Api.CreateSolidFill(Api.CreateRGBColor(255, 111, 61));
   var oStroke = Api.CreateStroke(0, Api.CreateNoFill());
   var oDrawing = Api.CreateShape("cube", 3212465, 963295, oFill, oStroke);
   oParagraph.AddDrawing(oDrawing);
   oDrawing.ScaleHeight( i );
}

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).