Giter Club home page Giter Club logo

Comments (4)

desandro avatar desandro commented on July 17, 2024

Thanks for your interest. Two reasons:

  • stamps may not be supported by the Layout
  • reloadItems deals with items specifically. A better solution would be to add a method that does what you're looking for, perhaps reloadContent
Outlayer.prototype.reloadContent = function() {
  // collection of item elements
  this.reloadItems();
  // elements that affect layout, but are not laid out
  this.stamps = [];
  this.stamp( this.options.stamp );
};

from outlayer.

druellan avatar druellan commented on July 17, 2024

Thanks for the reply.

Yes, my problem is that this.stamp( this.options.stamp ); it is only called from Outlayer.prototype._create. So, if you are adding new "stamped" items on Packery for example, you need to use addItems or appended methods, otherwise new stamped items are not recognized.
Thats OK BUT, I'm relying on `reloadItems' just because I need to maintain a custom order for the items, so, it is much easier to just layout the bricks and call ´reloadItems´. I don't know if that makes sense.

I'm going to implement reloadContent as you suggest.

BTW, I'm also working on a new item property, "locked". The idea is to have an item that flow with the layout, but has some restrictions. For example, can't be dragged and can't be displaced if you drag another item over it.

Thanks again!

from outlayer.

desandro avatar desandro commented on July 17, 2024

Sounds interesting. I'd love to see the results and how you're putting Outlayer to use

from outlayer.

druellan avatar druellan commented on July 17, 2024

Thanks! I have dirty hack working, but I want to implement this into Outlayer and Packery's source to allow other users to use/fork or patch the code, since it looks that a couple of devs already asked for something like this.

from outlayer.

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.