Skip to content

Progress towards Improved Interactions

Pre-release
Pre-release

Choose a tag to compare

@crmorford crmorford released this 28 Feb 01:18
· 4687 commits to master since this release

v0.46.0

Features

onMouseDown() and onMouseUp() added to Dispatcher.Mouse

Users can now register callbacks to Dispatcher.Mouse to be called when mousedown and mouseup events occur, using onMouseDown() and onMouseUp():

var md = Plottable.Dispatcher.Mouse.getDispatcher(svgElement);
var downCallback = function(point) {
  // do something with the point on mousedown
};
var upCallback = function(point) {
  // do something with the point on mouseup
};
md.onMouseDown("callbackKey", downCallback);
md.onMouseUp("callbackKey", upCallback);
...
md.onMouseDown("callbackKey", null); // to remove the callback
md.onMouseUp("callbackKey", null); // to remove the callback

Bugfixes

  • When Axis.Category labels are rotated, the text wrapping that is applied is far less aggressive than before. (#1526).
  • Right oriented Axis.Category respects tick marks now. (#1646).
  • Scale.Time no longer locks up if both ends of the domain are set to the same value (#1689). This fix was mistakenly not merged into v0.46.0. It will be included in v0.47.0.

Other notes

The new Dispatcher.Mouse doesn't trigger events correctly on mobile devices. We expect a fix in 1-2 weeks.

Future

This week we began work on:

  • Interaction.Dragbox
  • an API endpoint which will return the closest data point to any position on the graph.

Expect to see these soon!