Closed abought closed 4 years ago
Draft release notes below
This version contains numerous breaking changes and new features. Although we have tried to keep most familiar aspects of using LocusZoom intact, please read carefully before upgrading.
If you are using LocusZoom via <script>
tag, LocusZoom now requires D3v5. Check any other visualizations on your site for compatibility.
Several new features are available and enabled by default.
LDServer
adapter)LocusZoom is highly customizable. We have added a variety of internal improvements that make it easier to build truly dynamic visualizations.
region_changed
plot-level event reports exact plot coordinates after pan, zoom, or region changelog10
transformation function (a complement to neglog10
). Useful for creating, eg, loglog plots.plot.destroy()
cleanup method: helps to avoid memory leaks when using LocusZoom with single-page-application frameworks like Vue or React.LocusZoom.use(function(LocusZoom, ...args) { /* plugin code*/ })
)add
, remove
, has
, get
, and list
methods. Efforts have been made to preserve method syntax for any existing usages. The code was heavily reorganized. Unused features were removed, and some improvements were made to make the library more approachable for new developers.
vendor.js
bundle.<script>
tag. import LocusZoom from 'locuszoom';
will continue to work. But you should update how you import extensions for best results: use locuszoom/esm/ext/...
instead of locuszoom/dist/ext/...
To support doc/instruction improvements, several things have been renamed.
LocusZoom.KnownDataSources
-> LocusZoom.Adapters
Data.Source
has been renamed to BaseApiAdapter
and is no longer available as a global.
locuszoom/data
to create true ES6 subclasses. <script>
tag, the shortcut for creating and registering a new class will be almost the same as old versions: LocusZoom.Adapters.extend('BaseApiAdapter', 'MySourceName', {})
.LocusZoom.DataSources
) was left unchanged.
dashboards
are now called toolbars
, and Dashboard.Components
-> Widgets
. dashboard.components
should be changed to toolbar.widgets
and Layouts.get('dashboard'...)
-> Layouts.get('toolbar'...)
.responsive_resize: both
mode has been removed. The default option (true) will now trigger resize only for width.
{field, operator, value}
keys. This extends and standardizes the quasi-public release of track filters from previous releases.
deprecated
in prior releases have been removed. In previous versions, these were usually indicated by warning messages on the JS console.LocusZoom.createCORSPromise
method has been removed. Internal usages have been replaced with the standard JS fetch
function; we recommend doing the same with your own code.LDLZ
data source (adapter) has been completely removed, because it referenced an old server. Prior LocusZoom versions had already introduced its replacement, LDLZ2
(also known as LDServer
).Data.Source.extend
has been removed, in favor of true ES6 classes. setElementStatusByFilters
and largely unused methods.datalayer.addField
method, due to limited utility. It is better to know what fields are required before requesting the data.If you are testing experimental LocusZoom features, we have changed the build scripts. Gulp has been removed and replaced with new commands: npm run dev
and npm run build
. The unit tests now support test coverage.
The build process and modules work on all currently supported node LTS versions: 10.x or above. Old versions of Ubuntu tend to ship with very old versions of nodeJS, so this is something to check if your modified locuszoom code refuses to build.
If you modify the code, we welcome open source contributions! Please share your improvements or suggestions.
💣 This PR includes some breaking changes to conventional LZ usage, especially for users who haven't upgraded in a while.
Internal changes
vendor.js
bundle.New features
plot.destroy()
method makes it easier to clean up global event listeners. (useful for component-based frameworks where plots may be created and destroyed)region_changed
event reports exact plot coordinates after pan, zoom, or region changelog10
transformation function (useful for creating eg loglog plots)New/ improved defaults
responsive_resize: both
mode as a plot layout configuration option. The default option (true) will now trigger resize only for width. Preserving aspect ratio sometimes caused odd behavior on rerender, and many of LZ usages will have already migrated to the new default.Potentially breaking changes
LDLZ
data source (adapter) has been completely removed, because it referenced a legacy server. Prior LocusZoom versions had already introduced introduced its replacement,LDLZ2
(also known asLDserver
).LDserver
adapter.deprecated
in prior releases have been removed. In previous versions, these were usually indicated by warning messages on the JS console.KnownDataSources
-> Adapters;Data.Source
has been renamed to BaseAdapter / RemoteAdapter, and is no longer available as a global.LocusZoom.DataSources
) was left unchanged.Dashboards
have been renamed into "toolbar" andDashboard.Components
->Widgets
. This rename may affect custom layout code, egdashboard.components
should be changed totoolbar.widgets
andLayouts.get('dashboard'...)
->Layouts.get('toolbar'...)
.add
,remove
,has
,get
, andlist
methods. Efforts have been made to preserve method syntax for any existing usages.extend
methods have been replaced bysomeregistry.add(es6Subclass)
.LocusZoom.createCORSPromise
method has been removed. Internal usages have been replaced with the standard JS methodfetch
; we recommend doing the same with your own code.line
layerinterpolate
option now uses the names ford3.line.curve
setElementStatusByFilters
and related methodsKnown issues (in progress)
TODO
responsive_resize: both
mode