lrsjng / jquery-fracs Goto Github PK
View Code? Open in Web Editor NEWjQuery plugin to determine the visible fractions of HTML elements.
Home Page: https://larsjung.de/jquery-fracs
jQuery plugin to determine the visible fractions of HTML elements.
Home Page: https://larsjung.de/jquery-fracs
The project seems to be unmaintained. It's better to archive it so current solutions get the focus and we have less irritation of so many solutions where most of them are outdated or unmaintained.
Cool project!
I think a minor improvement would be to have the drag handler move the minimap directly with the mouse (1px to 1px) instead of doing an easeout transition. it would make it feel much snappier and closer to a scrollbar.
You should be able to get the mouse y on each mouse move, store it, and calculate the delta. that should do it more or less.
Hello,
The demo doesn't works on IE8
http://larsjung.de/fracs/demo/
Strange but : jquery throw an error in IE console (access to unknown property):
Agent utilisateur : Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB7.1; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)
Horodateur : Thu, 11 Aug 2011 12:02:03 UTC
Message : Demande d'accès à la méthode ou aux propriétés inattendue. (quick translation : access to unknown property)
Ligne : 17
Caractère : 28691
Code : 0
URI : http://larsjung.de/fracs/demo/js/lib/jquery.min.js
I have 2 suggestions:
Thanks!
First of all, thanks a lot for your outline code! (As suggested on your homepage, I bought you a beer or two. :-))
I have one question:
Currently, the height of the outline needs to be set, otherwise the outline won't work at all. (If I remove height
from the canvas, I get height=NaN
in the browser.)
Because I want to use outline on documents which are pretty long, I'd like the outline to always use both the given width
and make full usage of the available height
.
Currently, this doesn't really work great, due to multiple issues:
height
, causing the width to also be reduced proportionally. In my case, this looks pretty bad, because the outlines of different chapters jump in size.height
below the value set on canvas, I can't scroll to the lower parts of the document anymore.Here is an example chapter were everything works just fine, because it's quite short: http://oxnrtr.de/scala-spec/01-lexical-syntax.html
Here is a larger example chapter which displays the issues I mentioned: http://oxnrtr.de/scala-spec/03-types.html
Would it be possible to have an outline mode where
width
stays always the same?Hi! Sorry for my poor knowledge of English.
I have long tried to understand the settings, but I still have a question.
On default settings of script, element is fading, when it reaches the any side of browser window. How to make the element begin to fade at a distance of side window? Like that http://i.imgur.com/fdVgm.jpg where "some element #4" position is fixed and others elements scrolled under him.
Or how to make the element will have 100% of max possible visibility when it in some fixed area of window and will fade when it out of area?
Please answer.
Thank you!
I would really like to use your plugin, but it doesn't seem to work with jQuery 1.8.
Is there a planned release which will support 1.8? Or maybe a patch or workaround I can apply?
Thanks
JS errors on page load.
ALSO, please document your known browser support.
Would love to use the project for a horizontal timeline project but no IE7+ support is a show stopper for me.
Hello, this is another question.
I spent more than 3 hours digging into the code to achieve something I need but could not achieve this. I'm pretty sure there will come other users who expect to simulate sublime sidebar.
#outline { position: fixed; top:0; height:100%; width: 200px; }
$("#outline").fracs("outline", { crop: true, styles: [ { selector: '.item', fillStyle: 'rgb(230,230,230)' }, { selector: 'h1', fillStyle: 'rgb(240,140,060)' } ] });
this is my configuration.
.item
s are appended when I scroll down.
And when this happens outline becomes nor blurry nor shrinks (depending how I style #outline)
Can it be used to preserve width of canvas and scroll view of canvas while scrolling body
Hope I explained my question well, else say so and I'll try to make a jsFiddle
This may be a question more than a bug or feature request.
As far as I can tell, your system determines the fraction visible based on the bounding box (window, parent element, etc). However, if there were two items within the same viewport stacked on one another, how would your system handle it?
Also, is it possible to set out own viewbox? For example, a 1x1 pixel box under the mouse cursor. Then use that box to determine which element is visible within it?
Hello, you have one hello world?
Hi,
I'm trying to use fracs on a collection of items with a custom viewport.
I successfully set the rectangle property using :
var Rect = jQuery.fracs.rect('#yir_content');
But I get an error when trying to execute:
var Fracs = jQuery.fracs.fracs('.month_container', Rect);
The error reads:
Uncaught TypeError: Object .month_container has no method 'intersection'
Could the fact that the '.month_container's are not direct descendants of the #yir_content element be causing the issue?
Any help would be greatly appreciated. Thanks!
Here's my prototype implementation:
http://hyp.dev.outr.com:8080/example/modal_component.html
When you click on one of the two rectangles it selects it and uses fracs().rects.viewport to determine how to position the outline. As you can see, when the rectangle is clipped by the scrollbar it doesn't properly represent that in fracs.
I'm dumping fracs information to the JavaScript console upon update.
fracs fails violently when elements don't have ostensible layout metrics
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.