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

Answers become out of sync if you add additional lines #1

Open
benjymous opened this issue Oct 13, 2015 · 7 comments
Open

Answers become out of sync if you add additional lines #1

benjymous opened this issue Oct 13, 2015 · 7 comments

Comments

@benjymous
Copy link

If you keep pressing enter to add lots of lines, the answer column ends up out of sync with the question column.

Chrome Version 45.0.2454.101 m (64-bit) on Windows 7

capture

@joxerg
Copy link

joxerg commented Sep 11, 2017

Hi, yeah, im having same issue. This does not happen in http://notepadcalculator.com/, any ideas for fixing??
Best regards,

@SteveRidout
Copy link
Owner

I updated notepadcalculator.com with some server side code to save and share calculations which I didn't want to share publically. Sorry about that.

The front end code is not minimized though so you can see how it works by viewing the source of http://notepadcalculator.com

The relevant code for keeping the two columns and the background ruler in sync is this in the current version at http://notepadcalculator.com:

  // sync scroll positions of input & output areas
  $inputArea.scroll(function () {
    var scrollTop = $inputArea.scrollTop();
    $outputArea.css({'top': -scrollTop});    
    $('.backgroundRuler').css({'top': -scrollTop});    
  });

It's likely that either the HTML or CSS will also need updating for this to work in the new version. I can't remember since it's been so long since I last touched this. Just pointing you in the right direction to figure this out yourself :-)

@joxerg
Copy link

joxerg commented Sep 11, 2017

Thanks Steve, i tried adding these lines but nopthing, tried too adding your the calc.js, calc.css and index.html from notepadcalculator.com but does not work, shouldn't?? thanks anyway!!

@SteveRidout
Copy link
Owner

Sorry, I don't have time to look into this. Hint: the HTML probably changed too.

@joxerg
Copy link

joxerg commented Sep 12, 2017 via email

@ww7
Copy link

ww7 commented Sep 26, 2017

Any chance http://notepadcalculator.com will suport percentage?
Example 123 + 4%

@joxerg
Copy link

joxerg commented Sep 26, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants