Code Duplication    Length = 30-30 lines in 2 locations

public/js/tinymce/themes/modern/theme.js 1 location

@@ 3555-3584 (lines=30) @@
3552
        global$9(window).on('resize', windowResizeHandler);
3553
      }
3554
    }
3555
    function repositionPanel(panel) {
3556
      var scrollY$$1 = funcs.getViewPort().y;
3557
      function toggleFixedChildPanels(fixed, deltaY) {
3558
        var parent$$1;
3559
        for (var i = 0; i < visiblePanels.length; i++) {
3560
          if (visiblePanels[i] !== panel) {
3561
            parent$$1 = visiblePanels[i].parent();
3562
            while (parent$$1 && (parent$$1 = parent$$1.parent())) {
3563
              if (parent$$1 === panel) {
3564
                visiblePanels[i].fixed(fixed).moveBy(0, deltaY).repaint();
3565
              }
3566
            }
3567
          }
3568
        }
3569
      }
3570
      if (panel.settings.autofix) {
3571
        if (!panel.state.get('fixed')) {
3572
          panel._autoFixY = panel.layoutRect().y;
3573
          if (panel._autoFixY < scrollY$$1) {
3574
            panel.fixed(true).layoutRect({ y: 0 }).repaint();
3575
            toggleFixedChildPanels(true, scrollY$$1 - panel._autoFixY);
3576
          }
3577
        } else {
3578
          if (panel._autoFixY > scrollY$$1) {
3579
            panel.fixed(false).layoutRect({ y: panel._autoFixY }).repaint();
3580
            toggleFixedChildPanels(false, panel._autoFixY - scrollY$$1);
3581
          }
3582
        }
3583
      }
3584
    }
3585
    function addRemove(add, ctrl) {
3586
      var i, zIndex = FloatPanel.zIndex || 65535, topModal;
3587
      if (add) {

public/js/tinymce/themes/inlite/theme.js 1 location

@@ 3497-3526 (lines=30) @@
3494
        global$7(window).on('resize', windowResizeHandler);
3495
      }
3496
    }
3497
    function repositionPanel$1(panel) {
3498
      var scrollY$$1 = funcs.getViewPort().y;
3499
      function toggleFixedChildPanels(fixed, deltaY) {
3500
        var parent$$1;
3501
        for (var i = 0; i < visiblePanels.length; i++) {
3502
          if (visiblePanels[i] !== panel) {
3503
            parent$$1 = visiblePanels[i].parent();
3504
            while (parent$$1 && (parent$$1 = parent$$1.parent())) {
3505
              if (parent$$1 === panel) {
3506
                visiblePanels[i].fixed(fixed).moveBy(0, deltaY).repaint();
3507
              }
3508
            }
3509
          }
3510
        }
3511
      }
3512
      if (panel.settings.autofix) {
3513
        if (!panel.state.get('fixed')) {
3514
          panel._autoFixY = panel.layoutRect().y;
3515
          if (panel._autoFixY < scrollY$$1) {
3516
            panel.fixed(true).layoutRect({ y: 0 }).repaint();
3517
            toggleFixedChildPanels(true, scrollY$$1 - panel._autoFixY);
3518
          }
3519
        } else {
3520
          if (panel._autoFixY > scrollY$$1) {
3521
            panel.fixed(false).layoutRect({ y: panel._autoFixY }).repaint();
3522
            toggleFixedChildPanels(false, panel._autoFixY - scrollY$$1);
3523
          }
3524
        }
3525
      }
3526
    }
3527
    function addRemove(add, ctrl) {
3528
      var i, zIndex = FloatPanel.zIndex || 65535, topModal;
3529
      if (add) {