Show:

I am the type definition of a Resource.

I am an abstract type, I should not be instantiated directly but rather my sub-types:

Methods

openPreview

(
  • elementOrigin
)

I create a preview dialog, call the .renderContent method of a given resource (e.g. ResourceImage/renderContent) and append the returned element to the dialog.

Parameters:

renderBasicPropertiesControls

(
  • overlay
)

When an Overlay got into Focus, its properties and some additional controls to edit the overlay's attributes should be shown in the right window of the player.

I provide a basic method, which can be extended by my sub-types.

I render properities controls for the UI for the overlay's following attributes:

  • overlay.data.start
  • overlay.data.end
  • overlay.data.position.top
  • overlay.data.position.left
  • overlay.data.position.width
  • overlay.data.position.height

Why is this function a method of Resource and not Overlay? --> Because there is only one type of Overlay, but this can hold in its resourceData attribute different types of Resources. And because the properties controls can depend on resourceData, the method is placed here and in the sub-types of Resource.

Parameters:

Returns:

{ controlsContainer: HTMLElement, changeStart: Function, changeEnd: Function, changeDimensions: Function }