title: How does Trello handle rearrangement of cards, lists, checklists etc
body: <p>I am making an app that will have to list of things which can be rearranged. </p>
  
  <p>Trello does it perfectly, it allows us to rearrange everything, from lists to cards and checklists. How does it do it?</p>
  
  <p>I checked the API calls they make while rearranging, turns out they are sending a key "pos" from the frontend. Everytime I rearrange a card, the ID of that card is used for a PUT request with and updated "pos" value.</p>
  
  <p>Here is a list before rearranging:</p>
  
  <pre><code>{
      "id": "553750612a364775ded5f841",
      "name": "test again",
      "closed": false,
      "idBoard": "55374f01f73ace7afec03698",
      "pos": 131071
  }
  </code></pre>
  
  <p>I drag and drop it before some other list, an API call to <code>https://trello.com/1/lists/553750612a364775ded5f841</code> is made and a new <code>pos:32767</code> is sent. The response comes as:</p>
  
  <pre><code>{
      "id": "553750612a364775ded5f841",
      "name": "test again",
      "closed": false,
      "idBoard": "55374f01f73ace7afec03698",
      "pos": 32767.5
  }
  </code></pre>
  
  <p>How is Trello doing it? </p>