I've had a quick play with the current dev version (2012-03-29) and am unsure as to what functionality is or isn't included from the Isotope plugin. I see that you have animated filtering working - top work!
I'm interested in using Isotope just to acheive a Masonry layout like this: http://isotope.metafizzy.co/demos/layout-modes.html
Is this something that is included but hidden in this module and if not, do you plan to include it?
| Comment | File | Size | Author |
|---|---|---|---|
| #24 | masonry-grid-sizer-1509506-23.patch | 2.13 KB | Chris Gillis |
Comments
Comment #1
dddbbb commentedI now have this working without the views_isotope module using drupal_add_js and Views templates but would love to see this functionailty make an appearance in this project in the future. Having Views plugin settings for most Isotope config would be really sweet.
Comment #2
lquessenberry commentedI absolutely love the module. I watched the beardcast and on my clean install, everything worked perfectly. I was wondering as well, if there is a way, even without it being built into the module, to perform the masonry grid layout. I am very interested in this feature, and would gladly appreciate any help or direction there. I can also provide any feedback if necessary for creating this functionality in the module.
Comment #3
kreynen commented@Greg Adams integrated layout mode options in a module in his and asked about merging project back in October #1309430: merging projects. I was buried in work at the time and didn't respond right away. I haven't been able to connect with Greg about collaborating, but manually changing the layout option in the javascript is an option until I have time to add a UI.
http://isotope.metafizzy.co/docs/layout-modes.html
http://drupalcode.org/project/views_isotope.git/blob/refs/heads/7.x-1.x:...
Then you'd need to remove the CSS setting specific sizes for the isotope-elements. Sorry I don't have time to add this ATM, but I'm willing to review any patches submitted.
Comment #4
adam1 commentedHello Kreynen,
i like Your module and i would like to implement manually the "one big element"-layout, which @Greg Adams posted here as code-snippets.
But i have no Idea, HOW and WHERE to implement. Could You give me some advice?
Thanks, Adam
Comment #5
ruralrooster commentedYes. I would LOVE to be able to use masonry layout with this too. I'll look into the js/ccs edits you mentioned kreynen in the mean time.
Comment #6
ruralrooster commentedOK. not following the js edit.... I don't see a layoutMode set in your js. Do I need to add that setting variable or edit a line already in there, and if so what line? Thanks in advance.
Comment #7
ruralrooster commentedOK OK, figured it out. in "views_isotope/views_isotope.js" around line 6, change:
to:
then in "views_isotope/views_isotope.css" around line 83, change:
to:
Obviously you can set the column width to something else, and style it how ever you want (margin, no margin, etc.)
Comment #8
ruralrooster commented@adam1
As for the example where the clicked item grows, here is what you can do. Add the same edits from my post above about masonry, AND in the .js file after line 4 ADD:
and before the close of the file which looks like:
ADD THIS:
AND edit .css file by ADDING:
NOTE: This won't make the first element large, only the clicked ones. This module doesn't use the views row structure like the example you shared, so that won't work without restructure.
AND ONCE AGAIN: css style the blocks however you want. you may need to mess with widths and add heights to get the grid to layout the way you want it.
I hope this helps!
Comment #9
adam1 commentedThanks,
that helps!
Comment #10
maerys commentedThe workaround in #7 works for me and it started to look like this: http://cl.ly/0U3w1u0m0l0J092X0s1C – there's no error in the console.
Now I would LOVE to have a resizable grid just like the main idea of Isotope in http://isotope.metafizzy.co/demos/layout-modes.html – is that possible and how? Did I do something wrong and it should resize it anyway but I missed a setting/patching?
Thanks in advance and for all your superb work!
/* edited my bad english... ;) */
Comment #11
kreynen commentedresizing is the feature of the containing div and that is often influenced by the fluid/fixed/responsive configuration of the theme. Here is an example of using Isotope without the filter on an Omega sub-theme to get the resizing http://accessvision.tv/videos
You'll notice that as you adjust the width of the browser the grid adjusts the columns from 4 in the wide media query down to 2 for the mobile query.
I do want to make the different Isotope layout options something that can be configured in the View vs. having to edit the CSS.
I think the best way to achieve that is to leave the .js/.css file as the default, but use a dynamically generated CSS if the View uses another layout option. IMHO that would give everyone the most flexibility, be backwards compatible, be designer friendly (no hook overrides), and offer higher performance when using the static .js/.css file.
Anyone have thoughts/concerns with that approach?
Comment #12
ruralrooster commented@maerys, if you leave off the width setting in the css .isotope-element, and set the masonry columnWidth: to the smallest width you want, you should be able to achieve the mixed width thing in the main example you posted. The widths then would be dictated by the width of the contained content. You can use imagecache to set different image styles to achieve varying image size. (ie. each tag has a different width, or horizontal vs vertical displays).
Comment #13
ruralrooster commented@kreynen, yeah, that seems like the general direction. you may be able to set a base css file, then create appending css files per layout mode that are called via "format setting" in views. same with the js
Comment #14
maerys commentedHow embarrassing... of course... the theme! Thanks for giving me this hint in such a polite manner! You guys rock!
Comment #15
maerys commentedMay I add something ... don't know if it's the right place but: I could get all those things working except one little issue: When I load the page created by the isotope view nothing happens. When I enlarge the window the isotopes were appearing. So I changed the jquery stuff at the start and in the end of the views_isotope.js and now it works:
START
(function($) { $(document).ready(function() {to
(function ($, Drupal, window, document, undefined) { jQuery(document).ready(function() {END
}); })(jQuery);to
}); })(jQuery, Drupal, this, this.document);Comment #16
adam1 commentedWhen calling an isotope-view, how can i show a predefined filtervalue instead of the default "*" (all) value?
Comment #17
kreynen commentedThe desire for more option that can be configured within Views far exceeds the time I have to contribute to this module. Client work funded the initial development and while I continue to use views_isotope in projects, I don't need a UI to add these options and I'm overwhelmed with other projects.
Anyone interested in stepping up to co-maintain this project? I'd rather put the limited time I have into helping get another developer familiar with git, Drupal.org packaging, and testing updates.
Comment #18
stevenmhouse commentedNote on images being loaded in view and screwing up the masonry (overlapping).
Do this: Download the imagesLoaded plugin referenced here: http://masonry.desandro.com/docs/intro.html
You can include anyway you would usually include js. For me I created a js folder INSIDE views_isotope and put the minified imagesLoded lib in there, then opent the .info file and included a reference to it:
files[] = js/jquery.imagesloaded.min.js
Then wrap thie $contaner.isotope({...}) with $container.imagesLoaded(function(){ ... });
Like this: $container.imagesLoaded(function(){
$container.isotope({
itemSelector: '.isotope-element',
//filter: '.nothing'
// SH Start
/*
masonry: {
columnWidth: 200
}
*/
// SH End*/
});
});
You can tell I commented out the masonry part... perhaps because I also have drupal masonry module loaded and that was doing the masonry for me... can't honeslyt remember because of all the things I have been messing with. The key is to call the imagesLoaded function.
SWEET!
Comment #19
paskainos commentedThis is some really great stuff!
@kreynen: thanks for all your work - the beardcast is awesome too.
@Greg Adams: if you're listening in on the Views isotope issue cue, thanks for reaching out, and for sharing your efforts.
It's a shame you two haven't been able to connect yet. To the others like @ruralrooster: thanks for sharing your insight and shedding light on manual overrides (i.e. hacks) and so forth. I have one production site using Views isotope and a few more in the wings, and I'm seriously thinking about how the pieces / UI should best be abstracted. I'm experimenting with some example use cases I believe to be fairly common, including:
@kreynen: do you have any suggestions in terms of direction, and is there any way we can help? Anybody else have any ideas? I'll admit I haven't had a look at Greg's sandbox project yet, but it's on my list.
Comment #20
Kazanir commentedEdit: Never mind, I appear to be extremely dumb.
For the other dumb people out there, it would be nice if this had an official dependency on the Isotope module Soon(tm) so that it is easier to verify if the Isotope library is actually loaded. :)
Comment #21
paskainos commentedHas anyone else noticed when using
layoutMode: 'masonry'(#7) for instance, the images overlap on initial load? We experienced that issue here and corrected the problem by calling the imagesLoaded plugin inviews_isotope.jsand wrapping:with:
Comment #21.0
paskainos commentedtypo
Comment #22
Chris Gillis commented#16 is totally off topic! adam1, there are other issues dealing with that question, please don't hijack.
Comment #23
Chris Gillis commentedAdded a grid-sizer div to make the css work a little easier. (See examples at http://isotope.metafizzy.co/layout-modes/masonry.html)
Note: I recommend using media queries in a responsive theme to modify the widths, depending on how many columns you want for each screen size. If you're not using media queries you may like to replace the percentages with pixel widths.
Comment #24
Chris Gillis commentedWoops, forgot the patch.
Comment #25
kreynen commentedComment #26
Chris Gillis commentedFixed in 7.x-2.0-beta1. Module now has reusable configurations. Feel free to raise new tickets for issues with specific layout modes, etc.