Coder Social home page Coder Social logo

Comments (9)

JGSolutions avatar JGSolutions commented on May 18, 2024 1

Beautiful! It works. Thanks for the help!

from react-joyride.

gilbarbara avatar gilbarbara commented on May 18, 2024

Hey,

Can you please post your steps options? Isn't working for all steps or just some?

from react-joyride.

JGSolutions avatar JGSolutions commented on May 18, 2024

First off I have 3 elements on the page only. When in portrait mode all elements are visible to the page so that works fine. In landscape mode when page loads the first time it points to the first correct element. The second element is not withing the viewport and does not work which points about another 100 pixels down and 3rd element works since it is within viewport on the right side.

Steps:

  1. Page loads tooltip pointing to correct element.
  2. Second element is not in view port click next and does not go to the second element as it does moves a few pixels down.
  3. Third step is fine.

JSON Steps
[ { title: translator.translate('esl.first_time_use.step2.title1'), text: translator.translate('esl.first_time_use.step2.description1'), selector: '.add-document-button', position: 'top-left', name: 'firstTimeDismissEditTransaction', stepName: 'firstTimeAddDocument' }, { title: translator.translate('esl.first_time_use.step2.title2'), text: translator.translate('esl.first_time_use.step2.description2'), selector: '.rolestype', position: 'top-left', name: 'firstTimeDismissEditTransaction', stepName: 'firstTimeAddSigner' }, { title: translator.translate('esl.first_time_use.step2.title3'), text: translator.translate('esl.first_time_use.step2.description3'), selector: '.design-transaction-button', position: 'bottom-right', name: 'firstTimeDismissEditTransaction', stepName: 'firstTimeNext' } ],

from react-joyride.

JGSolutions avatar JGSolutions commented on May 18, 2024

This condition returns me the wrong position

if (value + elHeight >= docHeight) {
newValue = docHeight - elHeight - 15;
}

My docHeight is 320
value is 296
elHeight is 148

The newValue returns about 140 which only scrolls 140 pixels.

I need the original value from placement.y which is 400 something and works great!

from react-joyride.

gilbarbara avatar gilbarbara commented on May 18, 2024

I fixed an issue with scrollToSteps in 2420d0c and published as 1.3.3. Please try it and tell me if it works.

Can you try the demo and see if it works like you want?

_preventWindowOverflow is needed for sure. if you set a step's position to left or right and you are using a mobile device, the tooltip needs to be relocated.

from react-joyride.

JGSolutions avatar JGSolutions commented on May 18, 2024

Thanks for the quick reply.

It doesn't fix the issue and not sure how that line fixes it. Like I said it's an issue with the condition in the method _preventWindowOverflow() that does not spit out the correct position that the tooltip needs to be at when advancing to the second step

if (value + elHeight >= docHeight) {
newValue = docHeight - elHeight - 15;
}

I actually included some designs of step1 and step2. First step works fine.
step1
step2

from react-joyride.

gilbarbara avatar gilbarbara commented on May 18, 2024

PR #48 merged and published as 1.3.4
Let me know if this works for you!

from react-joyride.

gilbarbara avatar gilbarbara commented on May 18, 2024

Btw, which device/browser were you testing?

from react-joyride.

JGSolutions avatar JGSolutions commented on May 18, 2024

Hi,

Thanks for the quick reply and fix. I will test it later in the day.

For testing it was on an iphone 5. The screen shots that i supplied above are from the chrome emulator dev tools with iphone5 user agent setting. Usually I develop it on chrome and then once it works great I will test it on an iphone5 with chrome and safari

from react-joyride.

Related Issues (20)

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.