Skip to main content

ImageUploadBuilder

A builder for a new ImageUpload.

Reference

constructor

buildImageUpload(file);

Create an image upload builder for the given file.

Parameters

NAMETYPEDESCRIPTION
fileFile | BlobThe image file to upload

Methods

dpi

dpi(dpi);

Set the grid dpi.

Parameters

NAMETYPEDESCRIPTION
dpinumberThe dpi of the image grid

Returns the current builder.


offset

offset(offset);

Set the grid offset.

Parameters

NAMETYPEDESCRIPTION
offsetVector2The offset of the image grid

Returns the current builder.


name

name(name);

Set the upload name.

Parameters

NAMETYPEDESCRIPTION
namestringThe name of the uploaded image. If left blank and a File input is used the file.name property will be used

Returns the current builder.


description

description(description: string)

Set the items description.

Parameters

NAMETYPEDESCRIPTION
descriptionstringThe description

Returns the current builder.


rotation

rotation(rotation);

Set the image rotation.

Parameters

NAMETYPEDESCRIPTION
rotationnumberThe default rotation of the image in degrees

Returns the current builder.


scale

scale(scale);

Set the image scale.

Parameters

NAMETYPEDESCRIPTION
scaleVector2The default scale of the image

Returns the current builder.


locked

locked(locked);

Set the items locked boolean.

Parameters

NAMETYPEDESCRIPTION
lockedbooleanThe locked setting

Returns the current builder.


visible

visible(visible);

Set the items visible boolean.

Parameters

NAMETYPEDESCRIPTION
visiblebooleanThe visible setting

Returns the current builder.


text

text(text);

Set the images text content.

Parameters

NAMETYPEDESCRIPTION
textTextContentThe content of the images text

Returns the current builder.


textItemType

textItemType(textItemType);

Set the images text item type.

Parameters

NAMETYPEDESCRIPTION
textItemType"LABEL" | "TEXT"The type of the images text

Returns the current builder.


textWidth

textWidth(width);

Set the image texts width.

Parameters

NAMETYPEDESCRIPTION
widthTextSizeThe text width

Returns the current builder.


textHeight

textHeight(height);

Set the image texts height.

Parameters

NAMETYPEDESCRIPTION
heightTextSizeThe text height

Returns the current builder.


richText

richText(richText);

Set the image texts richText.

Parameters

NAMETYPEDESCRIPTION
richTextRichTextThe rich text

Returns the current builder.


plainText

plainText(plainText);

Set the image texts plainText.

Parameters

NAMETYPEDESCRIPTION
plainTextstringThe plain text

Returns the current builder.


textType

textType(textType);

Set the image texts textType.

Parameters

NAMETYPEDESCRIPTION
textType"PLAIN" | "RICH"The text type

Returns the current builder.


textPadding

textPadding(padding);

Set the image text styles padding.

Parameters

NAMETYPEDESCRIPTION
paddingnumberThe text padding

Returns the current builder.


fontFamily

fontFamily(fontFamily);

Set the image text styles fontFamily.

Parameters

NAMETYPEDESCRIPTION
fontFamilystringThe text font family

Returns the current builder.


fontSize

fontSize(fontSize);

Set the image text styles fontSize.

Parameters

NAMETYPEDESCRIPTION
fontSizenumberThe text font size

Returns the current builder.


fontWeight

fontWeight(fontWeight);

Set the image text styles fontWeight.

Parameters

NAMETYPEDESCRIPTION
fontWeightnumberThe text font weight

Returns the current builder.


textAlign

textAlign(textAlign);

Set the image text styles textAlign.

Parameters

NAMETYPEDESCRIPTION
textAlign"LEFT" | "CENTER" | "RIGHT"The text horizontal alignment

Returns the current builder.


textAlignVertical

textAlignVertical(textAlignVertical);

Set the image text styles textAlignVertical.

Parameters

NAMETYPEDESCRIPTION
textAlignVertical"BOTTOM" | "MIDDLE" | "TOP"The text vertical alignment

Returns the current builder.


textFillColor

textFillColor(fillColor);

Set the image text styles fillColor.

Parameters

NAMETYPEDESCRIPTION
fillColorstringThe texts fill color

Returns the current builder.


textFillOpacity

textFillOpacity(fillOpacity);

Set the image text styles fillOpacity.

Parameters

NAMETYPEDESCRIPTION
fillOpacitynumberThe texts fill opacity

Returns the current builder.


textStrokeColor

textStrokeColor(strokeColor);

Set the image text styles strokeColor.

Parameters

NAMETYPEDESCRIPTION
strokeColorstringThe texts stroke color

Returns the current builder.


textStrokeOpacity

textStrokeOpacity(strokeOpacity);

Set the image text styles strokeOpacity.

Parameters

NAMETYPEDESCRIPTION
strokeOpacitynumberThe texts stroke opacity

Returns the current builder.


textStrokeWidth

textStrokeWidth(strokeWidth);

Set the image text styles strokeWidth.

Parameters

NAMETYPEDESCRIPTION
strokeWidthnumberThe texts stroke width

Returns the current builder.


textLineHeight

textLineHeight(lineHeight);

Set the image text styles lineHeight.

Parameters

NAMETYPEDESCRIPTION
lineHeightnumberThe texts line height

Returns the current builder.


build

build();

Returns the final ImageUpload.