Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data-role="carousel" #1647

Closed
TorakikiSan opened this issue Oct 16, 2020 · 9 comments
Closed

data-role="carousel" #1647

TorakikiSan opened this issue Oct 16, 2020 · 9 comments

Comments

@TorakikiSan
Copy link

Hi Olton!

A little help/hint!

Regardless of the video resolution (ex. 1680x1050 or 1920x1080 or 3840x2160), I would like to display various images (old arcade screen shoots) in the center of the screen with the object data-role="carousel". All screen shoots have a fixed width (640px) and variable height. I use

<DIV data-role = "carousel"
      data-auto-start = "true"
      data-controls-on-mouse = "true"
      data-cls-controls = "fg-white"
      data-bullet-style = "square"
      data-period = "3000"
      data-duration = "1000"
    >
    <DIV class = "slide" data-cover = "/snaps/bankp-640px.png"> </DIV>
    <DIV class = "slide" data-cover = "/snaps/mrdo-640px.png"> </DIV>
    <DIV class = "slide" data-cover = "/snaps/pacman-640px.png"> </DIV>
    <DIV class = "slide" data-cover = "/snaps/rodland-640px.png"> </DIV>
    <DIV class = "slide" data-cover = "/snaps/xevious-640px.png"> </DIV>
</DIV>

but the image is displayed full screen.

Is there a way to center in X and Y without resizing them?

Thank you!

@xscode-auto-reply
Copy link

Thanks for opening a new issue. The team has been notified and will review it as soon as possible.
For urgent issues and priority support, visit https://xscode.com/olton/Metro-UI-CSS

@olton
Copy link
Owner

olton commented Oct 16, 2020

You can set a fixed width for the carousel via the data-width = "640" attribute.

@olton olton closed this as completed Oct 16, 2020
@olton olton reopened this Oct 16, 2020
@TorakikiSan
Copy link
Author

<DIV data-role="carousel"
     data-auto-start="true"
     data-controls-on-mouse="true"
     data-cls-controls="fg-white"
     data-bullet-style="square"
     data-period="3000"
     data-duration="1000"
     data-width="640px"
   >

This are 2 sample images (same width, different height)

rodland-640px

xevious-640px

but nothing is changed!

@olton
Copy link
Owner

olton commented Oct 16, 2020

640 without px

@TorakikiSan
Copy link
Author

Sorry for the "px", but I tried both with and without and nothing has changed.

olton added a commit that referenced this issue Oct 17, 2020
@olton olton added this to the 4.4.1 milestone Oct 17, 2020
@olton
Copy link
Owner

olton commented Oct 17, 2020

Fixed in 4.4.1

  • Carousel: fixed usage attribute data-width, now this attribute applied to max-width css property for carousel

@olton
Copy link
Owner

olton commented Oct 17, 2020

In the current version, slides fill the entire carousel according to its width and the rule for height. You can set the width for the carousel (already fixed). or put the image inside the slide.

@olton
Copy link
Owner

olton commented Oct 17, 2020

I'm added in 4.4.1 new component ImageBox - https://codepen.io/olton/pen/GRqZBVN

@TorakikiSan
Copy link
Author

Thank you very much!

@olton olton closed this as completed Oct 19, 2020
olton added a commit that referenced this issue Oct 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants