Giter Club home page Giter Club logo

Comments (13)

jakesgordon avatar jakesgordon commented on June 3, 2024

If you are using the :horizontal or :vertical layout options, then there is also an (optional) :padding option you can use.

Unfortunately its not supported when using the :packed layout option. I'll look into adding that in a future release.

Thanks

from sprite-factory.

halida avatar halida commented on June 3, 2024

when I using padding, all image size are bigger, I need a margin..

from sprite-factory.

jakesgordon avatar jakesgordon commented on June 3, 2024

Oops, sorry, my mistake. You're right, you need a margin option, not padding - to give the image more room in the spritesheet, but not in the x,y,w,h coords generated for the css.

I'll try to add that in the next release

from sprite-factory.

levraipixel avatar levraipixel commented on June 3, 2024

Yep, that's exactly as @halida said. But I think you've already got that :)

from sprite-factory.

jakesgordon avatar jakesgordon commented on June 3, 2024

FYI: I've merged in @halida's pull request (Thanks!) into the master branch to add the new :margin option to the :horizontal and :vertical layout.

I'll see if I can get some time this weekend to also support padding/margin in the :packed layout and then see about releasing a minor update to the gem itself.

from sprite-factory.

levraipixel avatar levraipixel commented on June 3, 2024

Hi Jake,
Great news ! Looking forward to having this on :packed layout ;)
Thx

from sprite-factory.

jakesgordon avatar jakesgordon commented on June 3, 2024

Ok. It's done (on master branch). You can now specify :margin => 1 for any of the layout formats.

I probably won't publish a new gem version for a little while, I'll try to accumulate a few more fixes before publishing, if that's a problem let me know - I can be persuaded to change my mind!

from sprite-factory.

levraipixel avatar levraipixel commented on June 3, 2024

It works great, thanks !

from sprite-factory.

levraipixel avatar levraipixel commented on June 3, 2024

Does your comment mean that you won't push this change to rubygem ? I think it's really a great improvement since it prevents zooming from having a very bad effect :(
I'm using your gem on production and I dislike using :git => ... in my Gemfile, it's really too dangerous !

from sprite-factory.

jakesgordon avatar jakesgordon commented on June 3, 2024

No problem, I'll try to go through the last open issues and push a new version... maybe at the weekend ?

from sprite-factory.

levraipixel avatar levraipixel commented on June 3, 2024

take your time, this weekend or the next are both good options ! Thx a lot

from sprite-factory.

jakesgordon avatar jakesgordon commented on June 3, 2024

FYI: I've pushed a new sprite-factory gem (v1.5.0) with this change (and a couple others). You can read about it on codeincomplete.com

from sprite-factory.

levraipixel avatar levraipixel commented on June 3, 2024

this is huge, you made my day =)

from sprite-factory.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.