Component.Group improvements, refactored Interaction.Click
Pre-release
Pre-release
Good afternoon,
Today's release features improvements to Component.Group
, as well as a refactoring of Interaction.Click
.
Features
Adding Component
s to filled cells in Table
Adding a Component
to a Table
cell that is already occupied will now merge it above the Component
that is already there, creating a Group
. If the Component
being added or the Component
already there is a Group
, they will be combined using above()
.
See it in action: http://jsfiddle.net/3h567a36/1/
Interaction.Click
Restructured
Interaction.Click
now uses the new Interaction
architecture -- this means it will now return the correct position even when CSS transforms have been applied to the page. The callback registration method has been renamed to onClick()
.
Example Usage:
var clickInteraction = new Plottable.Interaction.Click();
clickInteraction.onClick(function(point){
// do something with the resultant Point -- maybe select an element?
...
});
plot.registerInteraction(clickInteraction);
See it in action: http://jsfiddle.net/uztbyhnz/1/
Bugfixes
Component.Group
no longer produces extra whitespace. Essentially,Group
will behave with the combined effect of each of its constituentComponent
s added to aTable
cell individually (#1791).- An
Axis.Time
with only single-tier configurations no longer occupies extra space where the extra tier would have been (#1800).
API-Breaking Changes
Interaction.Click
'scallback
setter has been replaced with anonClick
getter/setter API.
Upgrade Instructions
- In places where you are using
clickInteraction.callback(callback)
, this should be replaced withclickInteraction.onClick(callback)
.
Release Song
Jason Mraz - Geek in the Pink