Giter Site home page Giter Site logo

Comments (11)

jeromeetienne avatar jeromeetienne commented on June 8, 2024

here is a link to the file snapshotted above. it may helps reproduce the issue

https://github.com/jeromeetienne/jsdoced.js/blob/master/README.md

from markdown-scroll-sync.

mark-hahn avatar mark-hahn commented on June 8, 2024

Thanks very much for the report.

FYI: Currently I'm syncing top to top, which is causing this problem and has to be fixed. Unfortunately the scroll-into-view method for DOM elements can only sync to top or bottom. I'll try switching from syncing tops to syncing bottoms half-way through the file but there will be a jump at that point no matter how small. I'll try that but I may have to work a bit harder.

from markdown-scroll-sync.

mark-hahn avatar mark-hahn commented on June 8, 2024

Just a fun factoid: I just realized that it is impossible to fix this in general. If the markdown source is less than a screen tall and the preview is more that a screen tall, then there is no way to scroll the preview to the bottom because you can't scroll the source.

from markdown-scroll-sync.

mark-hahn avatar mark-hahn commented on June 8, 2024

When I loaded your file I couldn't repeat your problem. I couldn't on any file I had.

Anyway, I added code that forces preview to scroll to the bottom when the source is at the bottom. Let me know if it doesn't fix your problem.

Fixed in 0.3.0

from markdown-scroll-sync.

jeromeetienne avatar jeromeetienne commented on June 8, 2024

Thanks for your fast reaction. About the fixability and the fact the markdown preview may be larger than the original .md text...

What about the handling this by the cursor position ? like 'the current cursor position MUST be visible' ?

from markdown-scroll-sync.

jeromeetienne avatar jeromeetienne commented on June 8, 2024

here is another case with the top of the file, this time. the issue was the same with the previous version of the package.

here is the file. note that my cursor in on top of the file and that the tile isnt shown in the preview

screen shot 2015-03-12 at 13 52 10

from markdown-scroll-sync.

mark-hahn avatar mark-hahn commented on June 8, 2024

like 'the current cursor position MUST be visible' ?

I can argue that it is just as easy to use the scroll bar in the preview. It is something everyone already knows about so it wouldn't be a secret behavior.

here is another case with the top of the file

Can you do me a favor and post this as a new issue?

BTW, Do you think the last fix worked?

from markdown-scroll-sync.

jeromeetienne avatar jeromeetienne commented on June 8, 2024

like 'the current cursor position MUST be visible' ?

About that, here im just suggesting. If you dont feel it is important, this is cool. i know opensource takes time and i do appreciate your work.

if i feel it bother me, i would do a pullrequest or a fork :)

BTW, Do you think the last fix worked?

Yep it did worked thanks. here is a screenshot below of the current version

screen shot 2015-03-12 at 19 55 37

from markdown-scroll-sync.

mark-hahn avatar mark-hahn commented on June 8, 2024

like 'the current cursor position MUST be visible' ?

When I first saw this suggestion I was thinking that it was meant as a way
for the user to control the preview scroll by clicking in the source.

But now I realize it would work naturally that if you were typing at the
bottom or top the preview would scroll.

Can you make this an issue?

On Thu, Mar 12, 2015 at 11:56 AM, Jerome Etienne [email protected]
wrote:

like 'the current cursor position MUST be visible' ?

About that, here im just suggesting. If you dont feel it is important,
this is cool. i know opensource takes time and i do appreciate your work.

if i feel it bother me, i would do a pullrequest or a fork :)

BTW, Do you think the last fix worked?

Yep it did worked thanks. here is a screenshot below of the current version

[image: screen shot 2015-03-12 at 19 55 37]
https://cloud.githubusercontent.com/assets/252962/6625690/dc2e252a-c8f1-11e4-8fdf-e1d2e07aaad1.png


Reply to this email directly or view it on GitHub
#6 (comment)
.

from markdown-scroll-sync.

jeromeetienne avatar jeromeetienne commented on June 8, 2024

is this still needed ? it seems to work without any glitches here. on my files at least.

from markdown-scroll-sync.

mark-hahn avatar mark-hahn commented on June 8, 2024

This issue is fixed. I'll add a new one for your idea of matching the cursor position.

from markdown-scroll-sync.

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.