Solumin / YGO-FM-FusionCalc

A Fusion calculator for Yu-Gi-Oh! Forbidden Memories
20 stars 17 forks source link

Show Equipment Fusions #4

Open Solumin opened 8 years ago

Solumin commented 8 years ago

(Equip) cards are treated just like fusions. This program already splits them into their own database, all that needs to be done is to display them. I'm thinking it would be best to have a checkbox like "[_] Show Equips" or something that the user selects when searching.

CathodeRaymond commented 8 years ago

Yeah, that would be pretty easy to do. If you want to get fancy, there are filtering/sorting libraries like http://isotope.metafizzy.co/ that come with some pretty nice animations.

Solumin commented 8 years ago

I think both this feature and #8 can be accomplished using isotope. (Which is a beautiful library, by the way.)

One set of filters: [Monster Fusions] [General Fusions] [Equipment] [Result Fusions][All Fusions]("Result Fusions" being all the fusions that the card is the result of.) One set of sorts: [Name][Attack][Defense]

I guess the hard part would be dynamically showing the results of the search in the grid? Or do we load the entire fusion database and use isotope's filtering?

Solumin commented 8 years ago

I feel a little bad because I think it would involve undoing a bunch of your changes from #5...

CathodeRaymond commented 8 years ago

Getting rid of the columns etc is no big deal, but I implemented isotope on my branch on the handCalc (so far) and found out it's not so great for sorting things that didn't exist on page load.

The way isotope works is that it filters based on various html attributes (data attributes, classes, etc) so as long as we format the output correctly it can filter it. The big problem is that it doesn't do so well (so far, I haven't spent much time on it) with adding/removing things to the page and then trying to re-sort.