SteveRidout / notepad-calculator

Prototype for notepadcalculator.com. A web-based notepad with calculation support
http://notepadcalculator.com
MIT License
58 stars 12 forks source link

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

Open benjymous opened 9 years ago

benjymous commented 9 years ago

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 commented 7 years ago

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

SteveRidout commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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

joxerg commented 7 years ago

Thanks Seteve, i figured out how to fix it.

The sqrt operation does not work, i guess is because it hasnt the "math.min.js" of your site at notepadcalculator.com...

Thanks,

p e p r o m e r o

http://prg.wf

On Tue, Sep 12, 2017 at 7:47 AM, SteveRidout notifications@github.com wrote:

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

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/SteveRidout/notepad-calculator/issues/1#issuecomment-328828539, or mute the thread https://github.com/notifications/unsubscribe-auth/AbprALgHD-vYUiogzuV_-u7eFUSFoe8wks5shm9qgaJpZM4GNphi .

ww7 commented 7 years ago

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

joxerg commented 7 years ago

NoteCalc does.

p e p r o m e r o

http://prg.wf

On Tue, Sep 26, 2017 at 10:25 AM, ww7 notifications@github.com wrote:

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

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/SteveRidout/notepad-calculator/issues/1#issuecomment-332215574, or mute the thread https://github.com/notifications/unsubscribe-auth/AbprAMoJU97Hm5nhTcGyzaLMvZ7aO-2Gks5smQlTgaJpZM4GNphi .