Coder Social home page Coder Social logo

Comments (11)

ManalLiaquat avatar ManalLiaquat commented on July 26, 2024 1

@ManalLiaquat We can't provide the height explicitly because we want the picture's height to be same as width to show them equal in height and width. This issue has been resolved in the version 0.1.3, Checkout this PR #6.
Closing this issue. Feel free to reopen if you still find the issue in 0.1.3

@kashifsulaiman I am still having trouble in UI, using latest version=0.1.3. Here is the screenshot
screenshot_1

and using like this: <FacebookImage images={post.images} countFrom={5} width={35} fromRight={100} /> using width={35} because it is not get set with the card at width={100}. I think it is due to that you are using position: absolute in the CSS file.

from react-fb-image-grid.

kashifsulaiman avatar kashifsulaiman commented on July 26, 2024 1

@ManalLiaquat
Yes this is because of position absolute because we don't want our images to be dependent on parent's height.
For your issue, Wrap the FbImageLibrary component with a div, provide it the same height as the same you provided width to the component. e.g.

        <div style={{height: '50vw'}}>
          <FbImageLibrary images={images} width={50}/>
        </div>

        <div style={{height: '80vw'}}>
          <FbImageLibrary images={images} width={80}/>
        </div>

from react-fb-image-grid.

ManalLiaquat avatar ManalLiaquat commented on July 26, 2024 1

I uses this technique also, but did'nt work 🤔

@ManalLiaquat
Yes this is because of position absolute because we don't want our images to be dependent on parent's height.
For your issue, Wrap the FbImageLibrary component with a div, provide it the same height as the same you provided width to the component. e.g.

        <div style={{height: '50vw'}}>
          <FbImageLibrary images={images} width={50}/>
        </div>

        <div style={{height: '80vw'}}>
          <FbImageLibrary images={images} width={80}/>
        </div>

@kashifsulaiman I use this technique but didn't work for both devices (PC and mobile).

CODE:
<div style={{ height: "34vw" }}><FacebookImage images={post.images} width={34} align="left" /></div>

PC Screenshot:

download

Mobile Screenshot:

download 1

Now the mobile view is getting unpleasant. 🙄

from react-fb-image-grid.

kashifsulaiman avatar kashifsulaiman commented on July 26, 2024 1

Yes this is because 'vw' is 'view-width'. You've set '34vw' for the web, not for mobile. So for mobile, put another value. You've to make the conditional expression.
Like wise, detect if mobile then '100vw' else '34vw'.

from react-fb-image-grid.

kashifsulaiman avatar kashifsulaiman commented on July 26, 2024 1

@ManalLiaquat Fixed these bugs in v0.1.4
PR: #8

from react-fb-image-grid.

kashifsulaiman avatar kashifsulaiman commented on July 26, 2024

@ManalLiaquat Thanks for reporting, will fix it soon!

from react-fb-image-grid.

kashifsulaiman avatar kashifsulaiman commented on July 26, 2024

@ManalLiaquat We can't provide the height explicitly because we want the picture's height to be same as width to show them equal in height and width. This issue has been resolved in the version 0.1.3, Checkout this PR #6.
Closing this issue. Feel free to reopen if you still find the issue in 0.1.3

from react-fb-image-grid.

ManalLiaquat avatar ManalLiaquat commented on July 26, 2024

Yes this is because 'vw' is 'view-width'. You've set '37vw' for the web, not for mobile. So for mobile, put another value. You've to make the conditional expression.
Like wise, detect if mobile then '100vw' else '37vw'.

I am also thinking about this conditional expression but I did'nt do that because this Library is using react_bootstrap so it should be responsive. 😉🤗

from react-fb-image-grid.

kashifsulaiman avatar kashifsulaiman commented on July 26, 2024

@ManalLiaquat which library are you using for these cards? Let me know so I could test on these!

from react-fb-image-grid.

ManalLiaquat avatar ManalLiaquat commented on July 26, 2024

@ManalLiaquat which library are you using for these cards? Let me know so I could test on these!

Material-UI

from react-fb-image-grid.

ManalLiaquat avatar ManalLiaquat commented on July 26, 2024

@ManalLiaquat Fixed these bugs in v0.1.4
PR: #8

Thank you to fix this issue, this library is working now correctly on both; mobile and desktop devices.

from react-fb-image-grid.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.