You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import { Component, Input } from '@angular/core';
import { Arrow, AutoPlay, Parallax } from '@egjs/flicking-plugins';
import { NgxFlickingModule } from '@egjs/ngx-flicking';
import { ArticleObject } from '../../types/article';
@Component({
selector: 'app-featured-banner',
standalone: true,
imports: [NgxFlickingModule],
templateUrl: './featured-banner.component.html',
styleUrl: './featured-banner.component.scss',
})
export class FeaturedBannerComponent {
@Input() articles: ArticleObject[] = [];
plugins = [
new AutoPlay({
duration: 2000,
direction: 'NEXT',
}),
];
}
One can do it exactly the same way and it's not working. I noticed it's related to images being draggable, so setting it as false or adding something like -webkit-user-drag: none; to the image works. But without it, it doesn't. Although, it works in CodeSandbox but not in my local.
If a tag or img tag is inside a panel, preventDefaultOnDrag option is recommended to prevent the default dragging behavior of those tags.
Can you try that option and see if it resolves this issue?
Thanks for sharing the option@malangfox , yes it works! I proposed a change in the PR (mentioned above) to quickstart docs, so by this way we can have it working for everyone
Following https://codesandbox.io/p/sandbox/egjsngx-flicking-examples-czb2g with code:
Inside a component used on a page, i.e.
One can do it exactly the same way and it's not working. I noticed it's related to images being
draggable
, so setting it asfalse
or adding something like-webkit-user-drag: none;
to the image works. But without it, it doesn't. Although, it works in CodeSandbox but not in my local.Note: I also use Tailwind, but i added ngx-flicking last to take priority. Maybe related?
Is it the expected behavior?
The text was updated successfully, but these errors were encountered: