Home Reference Source
import FontDialog from '@osjs/dialogs/src/dialogs/font.js'
public class | source

FontDialog

Extends:

Dialog → FontDialog

Default OS.js Font Dialog

Constructor Summary

Public Constructor
public

constructor(core: Core, args: Object, callback: Function)

Constructor

Inherited Summary

From class Dialog
public

Gets the button (virtual) DOM elements

public

createView(children: Object[], state: Object): Object

Creates the default view

public

Destroys the dialog

public

emitCallback(name: String, ev: Event, close: Boolean)

Emits the callback

public

Gets the first negative button

public

Gets the first positive button

public

getValue(): *

Gets the dialog result value

public
public

render(cb: Function): *

Renders the dialog

Public Constructors

public constructor(core: Core, args: Object, callback: Function) source

Constructor

Override:

Dialog#constructor

Params:

NameTypeAttributeDescription
core Core

OS.js Core reference

args Object

Arguments given from service creation

args.minSize number
  • optional
  • default: 6

Minimum size

args.maxSize number
  • optional

Maximum size

args.unit string
  • optional
  • default: px

Unit

args.name string
  • optional

Initial font name

args.size number
  • optional

Initial font size

args.text string
  • optional

What text to preview

args.controls string[]
  • optional

What controls to show

args.fonts string[]
  • optional

List of fonts

callback Function

The callback function