-
Notifications
You must be signed in to change notification settings - Fork 6
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
Dont shrink Content #6
Comments
To your first question, yes, it should be possible and feasible to give the minimap a fixed width and scroll it along with the window like ST2's minimap. The math and UX of it was getting away from me when I first wrote this, so I intentionally avoided it for the first release. Canvas is the obvious solution to a lot of problems caused by HTML cloning of content, but I couldn't get the performance I wanted using canvas. See http://codecanyon.net/item/mgminimap-jquery-minimap-plugin/full_screen_preview/5698116 for an example of a plugin that uses html2canvas to draw a page to canvas for use as a minimap - it works, but the image quality is rather low, and the delay in drawing the page element to canvas and rendering feels a bit clumsy. I think the quality and speed could be improved somewhat, but its a low priority at the moment... especially since there are other tools that already do that. |
I opened a new issue (#7) to track investigating canvas alternatives... |
Agreed on quality. The first thing I liked in your plugin was how clear minimap was. Also it stated that one (and first) its feature is: On the subject - I just saw that jQuery.clone does not copy its event handlers bu default The problem that rose is that I have many functions delegated on body and window. + Using class and ID based callbacks, so it prevents many of my functions to execute (since they become arrays and etc.) Well I can handle that and rewrite it. but there will come others I believe. And many much problems can be easily solved with canvas |
One more way described here: Method 2: converting page to blob URL and then maybe putting it inside an iframe.
maybe this solution can be also done without blob, just making an iframe from jQuery.clone() object. Anyways just reporting everything I find useful, if this informations are irrelevant and not necessary just say so. I'm just very interested in this running on my website )) |
Yeah, the problem isn't that Canvas is fast, true, but javascript-based DOM rendering into canvas can't ever be as fast as browser-based rendering. You bring up some good options, though... If the minimap were cloned into an iframe, then the name collision of ids wouldn't be an issue because they would be in two separate documents, and the map would also not appear in in-page search results. The minimap on django.is is really cool and smooth, and probably the best way to go. |
Actually, looking over the plugin used on that demo page - https://github.com/demux/sublime-scroll - I'm really impressed with how smooth it is and the thoughtfulness of some of the options, like the "fixed elements". Other than in-page search results being duplicated, is there anything missing from that approach? |
Well, only the one I'm after - to put minimap on custom container rather than window. Yes it smooth and and without canvas it will be small and probably better. I went too far but this is general what minimap should handle. Also I was searching how to block iframe from searching but there seems no way for doing this. |
First of all, thanks for quick reply.
This is more request then issue.
I have setup new jsFiddle
http://jsfiddle.net/nLauR/2/embedded/result/
Is this technically possible (in terms of performance and size) to make minimap dont shrink, but just take window height and when necessary to scroll that place.
Like
sublime text
does thisI dont want to open new issue, so I'll ask it here, are you planning on moving to canvas? Coping will cause many issues (like search and event listeners with bootstrap and multiple IDs.. and many such)
The text was updated successfully, but these errors were encountered: