Skip to content

[v1.3.0] Enabling DragBox Layers

Choose a tag to compare

@dbt dbt released this 10 Jul 22:34
· 1957 commits to master since this release

In this release, we've made further performance improvements, and have added a method that allows users to enable and disable the dragbox interaction.

We are now marking fields and methods as deprecated, though they will remain usable in the code base until our next major version bump (2.0). If you are using anything marked as deprecated, you can expect to see a warning in the console with this information. An example warning message is as follows:

screen shot 2015-07-10 at 1 09 32 pm

Features

  • DragBoxLayer.enabled() lets you easily turn the dragbox interaction on and off. Disabling will not hide the drag box, but will prevent user input from changing it until it is enabled again. Check it out: http://jsfiddle.net/jksm96wh/
    screen shot 2015-07-10 at 1 27 08 pm

Deprecations

  • MILLISECONDS_IN_ONE_DAY is now deprecated due to the complexity of timezones, and the fact that the value it is supposed to represent is not a fixed quantity.
  • Formatters.relativeDate() is deprecated as it is impossible to compute correctly without timezone data.
  • Axis.ticklength() is deprecated, and has been renamed to Axis.innerTickLength().

Performance improvements

  • We now cache CSS colors to improve rendering speed on pages with multiple Plottable plots. If you need to update Scales.Color, you can use the Plottable.Scales.Color.invalidateColorCache() method.

New API points

  • Plottable.Scales.Color.invalidateColorCache() - Used for dynamic adjustment of CSS stylesheets prior to creating a new color scale.
  • DragBoxLayer.enabled() - Used to enable / disable / freeze the DragBoxLayer without removing it from the page.
  • Axis.innerTickLength() - Replacement method for tickLength(), is used for changing the length of tick marks on axes.

Thank you

  • A very special thanks to @estas for the PR that renamed tickLength to innerTickLength. Congratulations are also in order, as this is the first external pull request that we've accepted. We're looking forward to seeing more!