{"action":"created","issue":{"url":"https://api.github.com/repos/neveldo/jQuery-Mapael/issues/105","labels_url":"https://api.github.com/repos/neveldo/jQuery-Mapael/issues/105/labels{/name}","comments_url":"https://api.github.com/repos/neveldo/jQuery-Mapael/issues/105/comments","events_url":"https://api.github.com/repos/neveldo/jQuery-Mapael/issues/105/events","html_url":"https://github.com/neveldo/jQuery-Mapael/issues/105","id":116212378,"number":105,"title":"Clean the \"update\" event signature","user":{"login":"Indigo744","id":7137528,"avatar_url":"https://avatars.githubusercontent.com/u/7137528?v=3","gravatar_id":"","url":"https://api.github.com/users/Indigo744","html_url":"https://github.com/Indigo744","followers_url":"https://api.github.com/users/Indigo744/followers","following_url":"https://api.github.com/users/Indigo744/following{/other_user}","gists_url":"https://api.github.com/users/Indigo744/gists{/gist_id}","starred_url":"https://api.github.com/users/Indigo744/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Indigo744/subscriptions","organizations_url":"https://api.github.com/users/Indigo744/orgs","repos_url":"https://api.github.com/users/Indigo744/repos","events_url":"https://api.github.com/users/Indigo744/events{/privacy}","received_events_url":"https://api.github.com/users/Indigo744/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-11-10T22:02:24Z","updated_at":"2015-11-20T18:05:22Z","closed_at":null,"body":"This is a ticket to talk about the `event` signature.\r\n\r\nIn neveldo/jQuery-Mapael#85, you said you wanted to clean this signature. I agree it became quite complicated and an overhaul would be good.\r\nBefore:\r\n```\r\n$(\".container\").trigger('update', [updatedOptions, newPlots, deletedPlots, opt]);\r\n```\r\nAfter:\r\n```\r\nvar options = {\r\n  'mapOptions' : {}, // was updatedOptions\r\n  'replace' : true/false // whether mapsOptions should entirely replace current map options, or just extend it,\r\n  'newPlots' : {},\r\n  'newLinks' : {},\r\n  'deletedPlots: [],  // was opt.deletedPlots\r\n  'deletedLinks' : [],  // was opt.deletedLinks\r\n  'setLegendElemsState' => '...'  // was opt.setLegendElemsState\r\n  'afterUpdate' => ...,  // was opt.afterUpdate\r\n  'animDuration' : ...  // was opt.animDuration\r\n};\r\n$(\".container\").trigger('update', [options]);\r\n```\r\n\r\nSeveral questions:\r\n- shall it be backward compatible ? I think not. It would be hard to maintain.\r\n- what happened to resetPlots/resetAreas ? Actually, I never quite understood their purpose...\r\n- `deletedPlots` and `deletedLinks` could better be called to reflect what it is. Like `DeletePlotNames` and `DeleteLinkNames`?"},"comment":{"url":"https://api.github.com/repos/neveldo/jQuery-Mapael/issues/comments/158477451","html_url":"https://github.com/neveldo/jQuery-Mapael/issues/105#issuecomment-158477451","issue_url":"https://api.github.com/repos/neveldo/jQuery-Mapael/issues/105","id":158477451,"user":{"login":"Indigo744","id":7137528,"avatar_url":"https://avatars.githubusercontent.com/u/7137528?v=3","gravatar_id":"","url":"https://api.github.com/users/Indigo744","html_url":"https://github.com/Indigo744","followers_url":"https://api.github.com/users/Indigo744/followers","following_url":"https://api.github.com/users/Indigo744/following{/other_user}","gists_url":"https://api.github.com/users/Indigo744/gists{/gist_id}","starred_url":"https://api.github.com/users/Indigo744/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Indigo744/subscriptions","organizations_url":"https://api.github.com/users/Indigo744/orgs","repos_url":"https://api.github.com/users/Indigo744/repos","events_url":"https://api.github.com/users/Indigo744/events{/privacy}","received_events_url":"https://api.github.com/users/Indigo744/received_events","type":"User","site_admin":false},"created_at":"2015-11-20T18:05:22Z","updated_at":"2015-11-20T18:05:22Z","body":"To be honest, the 'all' behavior is a new feature and not a bug fix. Hence, mapael was not updated to 1.1.1 or 1.2.0. The currently supported version for production is still 1.1.0 for now. This master branch is inherently in development. Playing with a version in dev is done at your own risks!\r\n\r\nThat said, you are right we should have be more careful with this, and that's why I brought up the point here. Next time we could use a specific branch.\r\n\r\nThe only approach you have here is the one you said. A proper update of your software will be needed later when the new mapael version will be released. "}}