@syncfusion/ej2-ribbon 33.2.3 → 33.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ej2-ribbon.umd.min.js +2 -2
- package/dist/ej2-ribbon.umd.min.js.map +1 -1
- package/dist/es6/ej2-ribbon.es2015.js +20 -1
- package/dist/es6/ej2-ribbon.es2015.js.map +1 -1
- package/dist/es6/ej2-ribbon.es5.js +24 -5
- package/dist/es6/ej2-ribbon.es5.js.map +1 -1
- package/dist/global/ej2-ribbon.min.js +2 -2
- package/dist/global/ej2-ribbon.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +3 -3
- package/src/ribbon/items/ribbon-gallery.d.ts +1 -0
- package/src/ribbon/items/ribbon-gallery.js +24 -5
|
@@ -3902,7 +3902,7 @@ class RibbonGallery {
|
|
|
3902
3902
|
setWrapperStyle(popup, popupContainerItems) {
|
|
3903
3903
|
if (popup.width !== 'auto') {
|
|
3904
3904
|
popupContainerItems.forEach((ele) => {
|
|
3905
|
-
ele.style.flexFlow = 'wrap';
|
|
3905
|
+
ele.style.flexFlow = 'column wrap';
|
|
3906
3906
|
});
|
|
3907
3907
|
}
|
|
3908
3908
|
}
|
|
@@ -4175,6 +4175,9 @@ class RibbonGallery {
|
|
|
4175
4175
|
const popupContainerItems = popupContainerEle.querySelectorAll('.e-ribbon-gallery-container');
|
|
4176
4176
|
this.setWrapperStyle(popup, popupContainerItems);
|
|
4177
4177
|
this.setFoucsToFirstItem(popupContainerEle, true, item.id);
|
|
4178
|
+
if (popup.width !== 'auto') {
|
|
4179
|
+
this.alignGalleryPopupLeft(popupContainerEle, buttonEle);
|
|
4180
|
+
}
|
|
4178
4181
|
},
|
|
4179
4182
|
beforeClose: (args) => {
|
|
4180
4183
|
const isCancelled = this.popupEvents(args.event, item.gallerySettings, 'popupClose', false);
|
|
@@ -4345,6 +4348,22 @@ class RibbonGallery {
|
|
|
4345
4348
|
this.handleGalleryPopupNavigation(e, popupEle, isDropdown, itemID, popup, gallerySettings);
|
|
4346
4349
|
};
|
|
4347
4350
|
}
|
|
4351
|
+
alignGalleryPopupLeft(popup, buttonEle) {
|
|
4352
|
+
const popupEl = popup.parentElement;
|
|
4353
|
+
if (!popupEl) {
|
|
4354
|
+
return;
|
|
4355
|
+
}
|
|
4356
|
+
const currentLeft = parseFloat(popupEl.style.left);
|
|
4357
|
+
const buttonRect = buttonEle.getBoundingClientRect();
|
|
4358
|
+
const popupWidth = popupEl.offsetWidth;
|
|
4359
|
+
let targetLeft = buttonRect.left - popupWidth - 1;
|
|
4360
|
+
if (targetLeft < 0) {
|
|
4361
|
+
targetLeft = 1;
|
|
4362
|
+
}
|
|
4363
|
+
if (Math.abs(currentLeft - targetLeft) > 1) {
|
|
4364
|
+
popupEl.style.left = `${targetLeft}px`;
|
|
4365
|
+
}
|
|
4366
|
+
}
|
|
4348
4367
|
handleGalleryPopupNavigation(e, popupEle, isDropdown, itemID, popup, gallerySettings) {
|
|
4349
4368
|
const galleryPopupEle = popupEle.querySelectorAll('.e-ribbon-gallery-item');
|
|
4350
4369
|
if (galleryPopupEle) {
|