Comments (8)
The Fluid method explained in the Masonry Wiki should allow you to use Isotope in fluid layouts: https://github.com/desandro/masonry/wiki/faq
Also take a look at Chris Armstrong's implementation in his Zootool Inspiration gallery app: http://chris-armstrong.com/inspiration/
from isotope.
I can see Chris's example works but it's extremely hard to read. Chris hands over options is subsequent calls to isotope that don't match the options documentation? http://isotope.metafizzy.co/docs/options.html e.g:
isotope({columnWidth: ...})
I'm guessing this option might be getting ignored and the reason he gets away with this is the default outerWidth(true) on the first brick happens to be the same width as all his other bricks?
In my case this isn't true (the first brick spans 2 - 3 columns) so I tried to alter the original columnWidth using the documented format but it silently does nothing. So far the only way I've been able to get it to kinda work is to destroy isotope and fire the constructor again.
$(window).smartresize(function() {
$container.isotope('destroy').isotope({masonry: {columnWidth: new_width}});
});
from isotope.
Looks like this is buggier than I expected. See:
http://jsfiddle.net/desandro/N3PJT/1/
from isotope.
Yeah sorry. I didn't know if I was attempting something unsupported, I'd failed to understand the documentation or it was a bug.
I did take a quick peak at the source but it's been a long time since I've written any Javascript and it was obvious I was out of my depth. I figured the columnWidth is being cached somewhere or the options from subsequent isotope() calls aren't being merged in but I got lost trying to follow the widget bridge option stuff.
from isotope.
Lemme follow up properly:
Fluid Masonry layout + Isotope can work, but I'm finding a couple bugs:
- Using items with multiple widths doesn't quite work because jQuery calculates widths with fractions that can throw off the layout algorithm. Try uncommenting
.item.w2 { width: 36%; }
in the jsFiddle demo to see what I mean. - You need to call Isotope twice before it lays out properly. This is a bug, and I'm not sure where its coming from considering it doesn't happen with Masonry.
from isotope.
Hi,
if by Smart Columns you mean something like this - http://www.webappers.com/2009/06/10/autoresizing-smart-columns-with-jquery/ , then I have just come up with a solution for my Isotope project. (code borrowed from the concept of SmartColumns).
$container.children().width(Math.floor($container.width() / Math.floor($container.width() / 200)) - parseFloat($container.children().css("margin-right"))+"px")
// the 200px is what I would like my column width to be based upon, expanding and shrinking smartly
$container.imagesLoaded( function(){
$container.isotope({
itemSelector : 'li',
layoutMode : 'masonry',
masonry: {
columnWidth: Math.floor($container.width() / Math.floor($container.width() / 200))
},
resizable : false
});
And put the same code in $(window).smartresize and works like a charm!
from isotope.
The Fluid / responsive demo shows the proper technique for this.
from isotope.
Thanks for the answer, but it has 2 issues:
- it doesn't take "smart" columns into account, it doesn't calculate the number of columns that could fit into the layout and resize the appropriately; it just resizes the columns based on your set number for each container width (making them unreasonably small or large in either case).
- I had to open Chrome to see what it was actually supposed to look like. Please see my Firefox screenshot for reference: http://imageshack.us/photo/my-images/705/imageshackra.png/
from isotope.
Related Issues (20)
- Multiple dropdown/masonry galleries on 1 page
- Isotope resizising container images when applied to squarespace shop
- Filter multiple sections on a page HOT 2
- Error parsing data-masonry on row: SyntaxError: Expected property name or '}' in JSON at position 1
- 你们怎么解决的页面闪烁的问题?How do you solve the page flicker problem?
- How to scroll to a specific element during layout-animation? HOT 1
- Gutter works for columns not rows HOT 1
- error in docs example HOT 1
- filtering twice? HOT 2
- pile ties up when sorting? HOT 7
- Double loading of items when filtering or loading more HOT 1
- Using function and filter at the same time
- Strange spacing with filter active HOT 1
- Site is down HOT 1
- Images Stopped Displaying in Grid and Now in 1 Column. Should be 3 HOT 4
- Trying to filter buttons, search, and hash HOT 2
- Items get correctly displayed on 3 columns when using one filter, but get stacked on a single column if using a different filter HOT 3
- Issue with Icotope tab & Slick Slider HOT 2
- Istotope: CSS transitions/animations HOT 1
- This is a dead project, isn't it? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from isotope.