widgetUp(widget) {
        const is_itempool_widget = widget.constructor.name === 'ItempoolWidget';
        const widgets_array = is_itempool_widget ? this.itempool_widgets : this.reorderable_widgets;

        const index = widgets_array.indexOf(widget);

        // If index is 0 then do nothing
        if (index === 0) {
            return;
        }

        widgets_array.splice(index, 1);
        widgets_array.splice(index - 1, 0, widget);

        const elem = widget.dom_pointer;
        elem.parentElement.insertBefore(elem, elem.previousElementSibling);

        if (is_itempool_widget) {
            this.itempoolItemChangeAction();
        }
    }
/**
     * Move a widget up one position in the notebook builder form.
     *
     * @param {Widget} widget
     */
Move a widget up one position in the notebook builder form.
@param {Widget} widget
Move a widget up one position in the notebook builder form . @param { Widget } widget
widgetUp(widget) {
        const is_itempool_widget = widget.constructor.name === 'ItempoolWidget';
        const widgets_array = is_itempool_widget ? this.itempool_widgets : this.reorderable_widgets;
        const index = widgets_array.indexOf(widget);
        if (index === 0) {
            return;
        }
        widgets_array.splice(index, 1);
        widgets_array.splice(index - 1, 0, widget);
        const elem = widget.dom_pointer;
        elem.parentElement.insertBefore(elem, elem.previousElementSibling);
        if (is_itempool_widget) {
            this.itempoolItemChangeAction();
        }
    }
widgetUp ( widget ) { const is_itempool_widget = widget . constructor . name === 'ItempoolWidget' ; const widgets_array = is_itempool_widget ? this . itempool_widgets : this . reorderable_widgets ; const index = widgets_array . indexOf ( widget ) ; if ( index === 0 ) { return ; } widgets_array . splice ( index , 1 ) ; widgets_array . splice ( index - 1 , 0 , widget ) ; const elem = widget . dom_pointer ; elem . parentElement . insertBefore ( elem , elem . previousElementSibling ) ; if ( is_itempool_widget ) { this . itempoolItemChangeAction ( ) ; } }
Move a widget up one position in the notebook builder form.
Move a widget up one position in the notebook builder form .
// If index is 0 then do nothing