{"action":"created","issue":{"url":"https://api.github.com/repos/oakmac/chessboardjs/issues/98","labels_url":"https://api.github.com/repos/oakmac/chessboardjs/issues/98/labels{/name}","comments_url":"https://api.github.com/repos/oakmac/chessboardjs/issues/98/comments","events_url":"https://api.github.com/repos/oakmac/chessboardjs/issues/98/events","html_url":"https://github.com/oakmac/chessboardjs/issues/98","id":69164116,"number":98,"title":"Issue with draggable option","user":{"login":"tgoldenberg","id":10930134,"avatar_url":"https://avatars.githubusercontent.com/u/10930134?v=3","gravatar_id":"","url":"https://api.github.com/users/tgoldenberg","html_url":"https://github.com/tgoldenberg","followers_url":"https://api.github.com/users/tgoldenberg/followers","following_url":"https://api.github.com/users/tgoldenberg/following{/other_user}","gists_url":"https://api.github.com/users/tgoldenberg/gists{/gist_id}","starred_url":"https://api.github.com/users/tgoldenberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgoldenberg/subscriptions","organizations_url":"https://api.github.com/users/tgoldenberg/orgs","repos_url":"https://api.github.com/users/tgoldenberg/repos","events_url":"https://api.github.com/users/tgoldenberg/events{/privacy}","received_events_url":"https://api.github.com/users/tgoldenberg/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-17T15:45:21Z","updated_at":"2015-04-17T20:02:15Z","closed_at":"2015-04-17T19:08:25Z","body":"I am using Pusher for two player interaction. However, I am unable to toggle the :draggable attribute for cfg. I tried setting cfg.draggable = false after each move, and setting back to true after opponent's move, but this isn't working. Any suggestions? \r\n\r\nAlso, I am trying to present the captured pieces in a side bar. I saw the code related to this, just wondering if there's an easy solution you have prepared already? That would make it easier, thanks! \r\n\r\nBTW, great project!"},"comment":{"url":"https://api.github.com/repos/oakmac/chessboardjs/issues/comments/94063404","html_url":"https://github.com/oakmac/chessboardjs/issues/98#issuecomment-94063404","issue_url":"https://api.github.com/repos/oakmac/chessboardjs/issues/98","id":94063404,"user":{"login":"tgoldenberg","id":10930134,"avatar_url":"https://avatars.githubusercontent.com/u/10930134?v=3","gravatar_id":"","url":"https://api.github.com/users/tgoldenberg","html_url":"https://github.com/tgoldenberg","followers_url":"https://api.github.com/users/tgoldenberg/followers","following_url":"https://api.github.com/users/tgoldenberg/following{/other_user}","gists_url":"https://api.github.com/users/tgoldenberg/gists{/gist_id}","starred_url":"https://api.github.com/users/tgoldenberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgoldenberg/subscriptions","organizations_url":"https://api.github.com/users/tgoldenberg/orgs","repos_url":"https://api.github.com/users/tgoldenberg/repos","events_url":"https://api.github.com/users/tgoldenberg/events{/privacy}","received_events_url":"https://api.github.com/users/tgoldenberg/received_events","type":"User","site_admin":false},"created_at":"2015-04-17T20:02:15Z","updated_at":"2015-04-17T20:02:15Z","body":"for others who may be interested, here is the code I used, in Rails: \r\nvar onDragStart = function(source, piece, position, orientation) {\r\n  if (game.game_over() === true ||\r\n      (game.turn() === 'w' && \"<%= current_user.id %>\" === \"<%= @room.player2_id %>\") ||\r\n      (game.turn() === 'b' && \"<%= current_user.id %>\" === \"<%= @room.player1_id %>\") ||\r\n      (game.turn() === 'w' && piece.search(/^b/) !== -1) ||\r\n      (game.turn() === 'b' && piece.search(/^w/) !== -1)) {\r\n    return false;\r\n  }\r\n};"}}