tElementById('paletteDraggable');
      var palette = diagramEvent.diagram;
      pdrag.style.width = palette.documentBounds.width + 28 + 'px'; // account for padding/borders
      pdrag.style.height = palette.documentBounds.height + 38 + 'px';
    });

    $(() => {
      $('#paletteDraggable')
        .draggable({ handle: '#paletteDraggableHandle' })
        .resizable({
          // After resizing, perform another layout to fit everything in the palette's viewport
          stop: () => myPalette.layoutDi