feat: Add option to disable mousewheel carousel scrolling (#2263)
- Closes: #2220
This commit is contained in:
@@ -42,6 +42,9 @@ export class AdvancedCameraCardCarousel extends LitElement {
|
||||
@property({ attribute: false })
|
||||
public plugins?: EmblaCarouselPlugins;
|
||||
|
||||
@property({ attribute: false })
|
||||
public wheelScrolling?: boolean;
|
||||
|
||||
@property({ attribute: false })
|
||||
public selected = 0;
|
||||
|
||||
@@ -121,6 +124,7 @@ export class AdvancedCameraCardCarousel extends LitElement {
|
||||
loop: this.loop,
|
||||
plugins: this.plugins,
|
||||
textDirection: getTextDirection(this),
|
||||
wheelScrolling: this.wheelScrolling,
|
||||
},
|
||||
);
|
||||
} else if (changedProps.has('selected')) {
|
||||
|
||||
@@ -339,6 +339,7 @@ export class AdvancedCameraCardLiveCarousel extends LitElement {
|
||||
this._getPlugins.bind(this),
|
||||
)}
|
||||
.selected=${this._getSelectedCameraIndex()}
|
||||
.wheelScrolling=${this.liveConfig?.controls.wheel}
|
||||
transitionEffect=${this._getTransitionEffect()}
|
||||
@advanced-camera-card:carousel:select=${this._setViewHandler.bind(this)}
|
||||
@advanced-camera-card:media:loaded=${() => {
|
||||
|
||||
@@ -339,6 +339,7 @@ export class AdvancedCameraCardViewerCarousel extends LitElement {
|
||||
.dragEnabled=${this.viewerConfig?.draggable ?? true}
|
||||
.plugins=${guard([this.viewerConfig, this._media], this._getPlugins.bind(this))}
|
||||
.selected=${this._selected}
|
||||
.wheelScrolling=${this.viewerConfig?.controls.wheel}
|
||||
transitionEffect=${this._getTransitionEffect()}
|
||||
@advanced-camera-card:carousel:select=${(ev: CustomEvent<CarouselSelected>) => {
|
||||
this._setViewSelectedIndex(ev.detail.index);
|
||||
|
||||
Reference in New Issue
Block a user