<abstract> new Layout()
Defines layout abstract class.
Example
WebPDF.Toolbar.getRegistry().registerLayout('custom_layout', { 'constructor': function(options){ this.superclass.call(this, options); }, methods: { render: function(elements) { var $container = $('<div>'); $container.addClass('custom_layout'); elements.forEach(function(elm){ var $item = $('<div>'); $item.addClass('custom_layout_item') $item.append(elm); $container.append($item); }); return $container; } } });
Methods
-
render(childElements)
-
The render function receives
childElements
to allow you to organize them by wrapping in an new container element and returning it.Parameters:
Name Type Description childElements
Array.<jQuery> Returns:
- Type
- jQuery