Issue #3467793 by nicholass, mistrytheory, ckng, gnuschichten, vit.smutny:...
11 unresolved threads
Merge request reports
Activity
Filter activity
- Resolved by Justin Toupin
added 1 commit
- 1275566c - Refactor LPSortableInstances to use Map() and Set()
added 3 commits
-
d4b69552...c97badfb - 2 commits from branch
project:2.1.x
- d4840343 - Merge complete. Fix eslint issues.
-
d4b69552...c97badfb - 2 commits from branch
- Resolved by Justin Toupin
- Resolved by Justin Toupin
- Resolved by Justin Toupin
182 180 * @param {jQuery} $element The builder element. 183 181 */ 184 182 function updateUi($element) { changed this line in version 11 of the diff
462 drake.on('over', (el, container) => { 463 $(container).addClass('drag-target'); 464 }); 465 drake.on('out', (el, container) => { 466 $(container).removeClass('drag-target'); 454 const id = element.getAttribute('data-lpb-id'); 455 containers.forEach((container) => { 456 Drupal.LPSortableInstances.add( 457 id, 458 new Sortable(container, { 459 group: `lpb-${id}`, 460 draggable: '.js-lpb-component', 461 handle: '.lpb-drag', 462 animation: 150, 463 ghostClass: 'sortable-ghost', 464 onChoose(evt) { changed this line in version 11 of the diff
459 group: `lpb-${id}`, 460 draggable: '.js-lpb-component', 461 handle: '.lpb-drag', 462 animation: 150, 463 ghostClass: 'sortable-ghost', 464 onChoose(evt) { 465 evt.item.classList.add('is-dragging'); 466 element.classList.add('is-dragging'); 467 element.classList.add('is-navigating'); 468 }, 469 onUnchoose(evt) { 470 evt.item.classList.remove('is-dragging'); 471 element.classList.remove('is-dragging'); 472 element.classList.remove('is-navigating'); 473 element 474 .querySelectorAll('.sortable-to, .sortable-to--disallowed') changed this line in version 11 of the diff
465 evt.item.classList.add('is-dragging'); 466 element.classList.add('is-dragging'); 467 element.classList.add('is-navigating'); 468 }, 469 onUnchoose(evt) { 470 evt.item.classList.remove('is-dragging'); 471 element.classList.remove('is-dragging'); 472 element.classList.remove('is-navigating'); 473 element 474 .querySelectorAll('.sortable-to, .sortable-to--disallowed') 475 .forEach((to) => { 476 to.classList.remove('sortable-to'); 477 to.classList.remove('sortable-to--disallowed'); 478 }); 479 }, 480 onStart: (evt) => { changed this line in version 11 of the diff
460 draggable: '.js-lpb-component', 461 handle: '.lpb-drag', 462 animation: 150, 463 ghostClass: 'sortable-ghost', 464 onChoose(evt) { 465 evt.item.classList.add('is-dragging'); 466 element.classList.add('is-dragging'); 467 element.classList.add('is-navigating'); 468 }, 469 onUnchoose(evt) { 470 evt.item.classList.remove('is-dragging'); 471 element.classList.remove('is-dragging'); 472 element.classList.remove('is-navigating'); 473 element 474 .querySelectorAll('.sortable-to, .sortable-to--disallowed') 475 .forEach((to) => { changed this line in version 11 of the diff
470 evt.item.classList.remove('is-dragging'); 471 element.classList.remove('is-dragging'); 472 element.classList.remove('is-navigating'); 473 element 474 .querySelectorAll('.sortable-to, .sortable-to--disallowed') 475 .forEach((to) => { 476 to.classList.remove('sortable-to'); 477 to.classList.remove('sortable-to--disallowed'); 478 }); 479 }, 480 onStart: (evt) => { 481 $(element).trigger('lpb-component:drag', [ 482 evt.item.getAttribute('data-uuid'), 483 ]); 484 }, 485 onEnd: (evt) => { changed this line in version 11 of the diff
454 const id = element.getAttribute('data-lpb-id'); 455 containers.forEach((container) => { 456 Drupal.LPSortableInstances.add( 457 id, 458 new Sortable(container, { 459 group: `lpb-${id}`, 460 draggable: '.js-lpb-component', 461 handle: '.lpb-drag', 462 animation: 150, 463 ghostClass: 'sortable-ghost', 464 onChoose(evt) { 465 evt.item.classList.add('is-dragging'); 466 element.classList.add('is-dragging'); 467 element.classList.add('is-navigating'); 468 }, 469 onUnchoose(evt) { changed this line in version 11 of the diff
476 to.classList.remove('sortable-to'); 477 to.classList.remove('sortable-to--disallowed'); 478 }); 479 }, 480 onStart: (evt) => { 481 $(element).trigger('lpb-component:drag', [ 482 evt.item.getAttribute('data-uuid'), 483 ]); 484 }, 485 onEnd: (evt) => { 486 reorderComponents(element); // Trigger reordering logic. 487 $(element).trigger('lpb-component:drop', [ 488 evt.item.getAttribute('data-uuid'), 489 ]); 490 }, 491 onMove: (evt) => { changed this line in version 11 of the diff
477 to.classList.remove('sortable-to--disallowed'); 478 }); 479 }, 480 onStart: (evt) => { 481 $(element).trigger('lpb-component:drag', [ 482 evt.item.getAttribute('data-uuid'), 483 ]); 484 }, 485 onEnd: (evt) => { 486 reorderComponents(element); // Trigger reordering logic. 487 $(element).trigger('lpb-component:drop', [ 488 evt.item.getAttribute('data-uuid'), 489 ]); 490 }, 491 onMove: (evt) => { 492 element.querySelectorAll('.sortable-to').forEach((to) => { changed this line in version 11 of the diff
575 635 attachUiElements($(el), settings); 576 636 }); 577 637 638 document.querySelectorAll('[data-lpb-id]').forEach((container) => { changed this line in version 11 of the diff
582 648 (e) => { 583 649 const $element = $(e.currentTarget); 584 650 updateUi($element); 651 // Remove focus from all `+` buttons after a new component is inserted. 652 const $addButton = $element.find('.lpb-btn--add:focus'); changed this line in version 11 of the diff
Please register or sign in to reply