function removeSlowly(button, pattern) {
  const node = $(button).closest(pattern);
  // Must call necessary validators only after the node is removed,
  // but we can only figure out which validators these are before removal.
  // We do so, and after removal, click the corresponding buttons to trigger
  // validation.
  let buttonsToClick = $();
  node.parents('fieldset').each(function() {
    buttonsToClick =
        buttonsToClick.add($(this).children('legend').find('.validate_button'));
  });
  makeUndoable(node);
  node.hide('slow', function() {
    buttonsToClick.trigger('click');
    ord.inputs.updateSidebar();
  });
  dirty();
}
/**
 * Removes from the DOM the nearest ancestor element matching the pattern.
 * @param {string} button The element from which to start the search.
 * @param {string} pattern The pattern for the element to remove.
 */
Removes from the DOM the nearest ancestor element matching the pattern.
@param {string} button The element from which to start the search.
@param {string} pattern The pattern for the element to remove.
Removes from the DOM the nearest ancestor element matching the pattern . @param { string } button The element from which to start the search . @param { string } pattern The pattern for the element to remove .
function removeSlowly(button, pattern) {
  const node = $(button).closest(pattern);
  let buttonsToClick = $();
  node.parents('fieldset').each(function() {
    buttonsToClick =
        buttonsToClick.add($(this).children('legend').find('.validate_button'));
  });
  makeUndoable(node);
  node.hide('slow', function() {
    buttonsToClick.trigger('click');
    ord.inputs.updateSidebar();
  });
  dirty();
}
function removeSlowly ( button , pattern ) { const node = $ ( button ) . closest ( pattern ) ; let buttonsToClick = $ ( ) ; node . parents ( 'fieldset' ) . each ( function ( ) { buttonsToClick = buttonsToClick . add ( $ ( this ) . children ( 'legend' ) . find ( '.validate_button' ) ) ; } ) ; makeUndoable ( node ) ; node . hide ( 'slow' , function ( ) { buttonsToClick . trigger ( 'click' ) ; ord . inputs . updateSidebar ( ) ; } ) ; dirty ( ) ; }
Removes from the DOM the nearest ancestor element matching the pattern.
Removes from the DOM the nearest ancestor element matching the pattern .
// Must call necessary validators only after the node is removed, // but we can only figure out which validators these are before removal. // We do so, and after removal, click the corresponding buttons to trigger // validation.