tiny_aiplacement/generateimage

Description:
  • Tiny AI generate images.

Source:
License:
  • http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Tiny AI generate images.

Methods

(async) displayGeneratedImage(root)

Description:
  • Display the generated image in the modal.

Source:
Parameters:
Name Type Description
root HTMLElement

The root element of the modal.

getDisplayArgs(root)

Description:
  • Get the display args for the image.

Source:
Parameters:
Name Type Description
root Object

The root element of the modal.

getSelectedRadioValue(radioName, defaultValue)

Description:
  • Get the value of the selected radio button.

Source:
Parameters:
Name Type Default Description
radioName String

The name of the radio button group.

defaultValue String null

The default value of the radio button.

handleContentModalClick(e, root)

Description:
  • Handle click events within the image modal.

Source:
Parameters:
Name Type Description
e Event

The click event object.

root HTMLElement

The root element of the modal.

(async) handleGenerationError(root, submitBtn, errorMessage)

Description:
  • Handle a generation error.

Source:
Parameters:
Name Type Description
root Object

The root element of the modal.

submitBtn Object

The submit button element.

errorMessage String

The error message to display.

(async) handleInsert()

Description:
  • Handle the insert action.

Source:

(async) handleSubmit(root, submitBtn)

Description:
  • Handle the submit action.

Source:
Parameters:
Name Type Description
root Object

The root element of the modal.

submitBtn Object

The submit button element.

setupPromptArea(root)

Description:
  • Set up the prompt area in the modal, adding necessary event listeners.

Source:
Parameters:
Name Type Description
root HTMLElement

The root element of the modal.