- 
                Notifications
    You must be signed in to change notification settings 
- Fork 195
Closed
Description
This is a ticket to talk about the event signature.
In #85, you said you wanted to clean this signature. I agree it became quite complicated and an overhaul would be good.
Before:
$(".container").trigger('update', [updatedOptions, newPlots, deletedPlots, opt]);
After:
var options = {
  'mapOptions' : {}, // was updatedOptions
  'replace' : true/false // whether mapsOptions should entirely replace current map options, or just extend it,
  'newPlots' : {},
  'newLinks' : {},
  'deletedPlots: [],  // was opt.deletedPlots
  'deletedLinks' : [],  // was opt.deletedLinks
  'setLegendElemsState' => '...'  // was opt.setLegendElemsState
  'afterUpdate' => ...,  // was opt.afterUpdate
  'animDuration' : ...  // was opt.animDuration
};
$(".container").trigger('update', [options]);
Several questions:
- shall it be backward compatible ? I think not. It would be hard to maintain.
- what happened to resetPlots/resetAreas ? Actually, I never quite understood their purpose...
- deletedPlotsand- deletedLinkscould better be called to reflect what it is. Like- DeletePlotNamesand- DeleteLinkNames?
Metadata
Metadata
Assignees
Labels
No labels