API Docs for: 0.0.2
Show:

dialog.Dialog Class

Extends Window
Module: Canvas

Basic dialog class and base class for all other dialogs

Methods

showAt

(
  • x
  • y
)

Inherited from Window: api/src/window.js:175

Show window at x and y position

Parameters:

Returns:

void

showCentered

()

Inherited from Window: api/src/window.js:202

Show window centered on screen

Returns:

void

Attributes

autoDispose

Boolean optional

Auto dispose/erase component on close

Default: true

Fires event autoDisposeChange

Fires when the value for the configuration attribute autoDispose is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:

  • e EventFacade
    An Event Facade object with the following attribute-specific properties added:
    • prevVal Any
      The value of the attribute, prior to it being set.
    • newVal Any
      The value the attribute is to be set to.
    • attrName String
      The name of the attribute being set.
    • subAttrName String
      If setting a property within the attribute's value, the name of the sub-attribute property being set.

autoHideOnBtnClick

Boolean optional

Auto hide component on button click. If autoDispose is set to true, the component will be deleted

Default: true

Fires event autoHideOnBtnClickChange

Fires when the value for the configuration attribute autoHideOnBtnClick is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:

  • e EventFacade
    An Event Facade object with the following attribute-specific properties added:
    • prevVal Any
      The value of the attribute, prior to it being set.
    • newVal Any
      The value the attribute is to be set to.
    • attrName String
      The name of the attribute being set.
    • subAttrName String
      If setting a property within the attribute's value, the name of the sub-attribute property being set.

buttonConfig

String

Camel case string config for buttons.
example: YesNoCancel for three buttons labeled "Yes", "No" and "Cancel"
Example of use:

Default: undefined

Fires event buttonConfigChange

Fires when the value for the configuration attribute buttonConfig is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:

  • e EventFacade
    An Event Facade object with the following attribute-specific properties added:
    • prevVal Any
      The value of the attribute, prior to it being set.
    • newVal Any
      The value the attribute is to be set to.
    • attrName String
      The name of the attribute being set.
    • subAttrName String
      If setting a property within the attribute's value, the name of the sub-attribute property being set.

Example:

     new ludo.dialog.Dialog({
          html : 'Do you want to save your work?',
           buttonConfig : 'YesNoCancel'
           listeners : {
               'yes' : this.saveWork.bind(this),
               'no' : this.discardWork.bind(this),
               'cancel' : this.hide.bind(this)
           }
      });

height

Number

Inherited from Window: api\src\window.js:58

Height of window

Default: 200

Fires event heightChange

Fires when the value for the configuration attribute height is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:

  • e EventFacade
    An Event Facade object with the following attribute-specific properties added:
    • prevVal Any
      The value of the attribute, prior to it being set.
    • newVal Any
      The value the attribute is to be set to.
    • attrName String
      The name of the attribute being set.
    • subAttrName String
      If setting a property within the attribute's value, the name of the sub-attribute property being set.

hideBodyOnMove

Boolean

Inherited from Window: api\src\window.js:81

Hide content of window while moving/dragging the window

Default: false

Fires event hideBodyOnMoveChange

Fires when the value for the configuration attribute hideBodyOnMove is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:

  • e EventFacade
    An Event Facade object with the following attribute-specific properties added:
    • prevVal Any
      The value of the attribute, prior to it being set.
    • newVal Any
      The value the attribute is to be set to.
    • attrName String
      The name of the attribute being set.
    • subAttrName String
      If setting a property within the attribute's value, the name of the sub-attribute property being set.

left

Number

Inherited from Window: api\src\window.js:46

Left position of window

Default: undefined

Fires event leftChange

Fires when the value for the configuration attribute left is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:

  • e EventFacade
    An Event Facade object with the following attribute-specific properties added:
    • prevVal Any
      The value of the attribute, prior to it being set.
    • newVal Any
      The value the attribute is to be set to.
    • attrName String
      The name of the attribute being set.
    • subAttrName String
      If setting a property within the attribute's value, the name of the sub-attribute property being set.

modal

Boolean optional

Show modal version of dialog

Default: true

Fires event modalChange

Fires when the value for the configuration attribute modal is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:

  • e EventFacade
    An Event Facade object with the following attribute-specific properties added:
    • prevVal Any
      The value of the attribute, prior to it being set.
    • newVal Any
      The value the attribute is to be set to.
    • attrName String
      The name of the attribute being set.
    • subAttrName String
      If setting a property within the attribute's value, the name of the sub-attribute property being set.

movable

Boolean

Inherited from Window: api\src\window.js:30

True to make the window movable

Default: true

Fires event movableChange

Fires when the value for the configuration attribute movable is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:

  • e EventFacade
    An Event Facade object with the following attribute-specific properties added:
    • prevVal Any
      The value of the attribute, prior to it being set.
    • newVal Any
      The value the attribute is to be set to.
    • attrName String
      The name of the attribute being set.
    • subAttrName String
      If setting a property within the attribute's value, the name of the sub-attribute property being set.

preserveAspectRatio

Boolean

Inherited from Window: api\src\window.js:88

Preserve aspect ratio when resizing

Default: false

Fires event preserveAspectRatioChange

Fires when the value for the configuration attribute preserveAspectRatio is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:

  • e EventFacade
    An Event Facade object with the following attribute-specific properties added:
    • prevVal Any
      The value of the attribute, prior to it being set.
    • newVal Any
      The value the attribute is to be set to.
    • attrName String
      The name of the attribute being set.
    • subAttrName String
      If setting a property within the attribute's value, the name of the sub-attribute property being set.

resizeLeft

Boolean

Inherited from Window: api\src\window.js:72

When set to true, resize handle will be added to the left ludo of the window. This can be useful to turn off when you're extending the ludo.Window component to create custom components where left position should be fixed.

Default: true

Fires event resizeLeftChange

Fires when the value for the configuration attribute resizeLeft is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:

  • e EventFacade
    An Event Facade object with the following attribute-specific properties added:
    • prevVal Any
      The value of the attribute, prior to it being set.
    • newVal Any
      The value the attribute is to be set to.
    • attrName String
      The name of the attribute being set.
    • subAttrName String
      If setting a property within the attribute's value, the name of the sub-attribute property being set.

resizeTop

Boolean

Inherited from Window: api\src\window.js:64

When set to true, resize handle will be added to the top ludo of the window. This can be useful to turn off when you're extending the ludo.Window component to create custom components where top position should be fixed.

Default: true

Fires event resizeTopChange

Fires when the value for the configuration attribute resizeTop is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:

  • e EventFacade
    An Event Facade object with the following attribute-specific properties added:
    • prevVal Any
      The value of the attribute, prior to it being set.
    • newVal Any
      The value the attribute is to be set to.
    • attrName String
      The name of the attribute being set.
    • subAttrName String
      If setting a property within the attribute's value, the name of the sub-attribute property being set.

top

Number

Inherited from Window: api\src\window.js:40

Top position of window

Default: undefined

Fires event topChange

Fires when the value for the configuration attribute top is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:

  • e EventFacade
    An Event Facade object with the following attribute-specific properties added:
    • prevVal Any
      The value of the attribute, prior to it being set.
    • newVal Any
      The value the attribute is to be set to.
    • attrName String
      The name of the attribute being set.
    • subAttrName String
      If setting a property within the attribute's value, the name of the sub-attribute property being set.

width

Number

Inherited from Window: api\src\window.js:52

Width of window

Default: 300

Fires event widthChange

Fires when the value for the configuration attribute width is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:

  • e EventFacade
    An Event Facade object with the following attribute-specific properties added:
    • prevVal Any
      The value of the attribute, prior to it being set.
    • newVal Any
      The value the attribute is to be set to.
    • attrName String
      The name of the attribute being set.
    • subAttrName String
      If setting a property within the attribute's value, the name of the sub-attribute property being set.

Events

<lowercase button value>

This event is fired when a button is clicked. The name of the button is lowercase version of button value with white space removed Example: for a button with value "OK", an "ok" event will be sent.

Event Payload:

  • ludo.View Object

    (Parent component of button)