+

Search Tips   |   Advanced Search

Apply a drag-and-drop source to the layout


We can apply different sources to the layout containers to control the drag-and-drop experience. When the DNDController initializes, it finds the newDNDSourceCSS class on the container, and performs the mapping to the custom.DNDSource and instantiatethat object.

  1. Add a source definition to the ibmCfg.themeConfig.dndSourceDefintions array in the form. The object class should be an inheritor of dojo.dnd.Source to function within the drag and drop framework, , for example:

    {id:"newDndSourceCSS", object:"custom.DNDSource", orientation: "vertical"}

  2. Add the CSS class defined in dndSourceDefinitions to applicable containers in a layout template (layout.html):

    <div class="component-container wpthemeCol wpthemePrimaryContainer ibmDndColumn wpthemeLeft newDndSourceCSS" name="ibmMainContainer"></div>


Parent: Drag-and-drop