statgen / locuszoom

A Javascript/d3 embeddable plugin for interactively visualizing statistical genetic data from customizable sources.
https://statgen.github.io/locuszoom/
MIT License
156 stars 29 forks source link

Safer method for registering custom DataLayers #34

Closed Frencil closed 8 years ago

Frencil commented 8 years ago

The Problem

As of version 0.3.0 (see #30) DataLayer classes are checked for existence via basic string comparison, implying that custom DataLayer classes need to be directly added to the LocusZoom singleton. This could create conflicts in the future as implementers of the plugin overwrite existing attributes of the singleton.

Proposed Solution

As described by @mflick here this could be more effectively handled with a custom collection class here with add/get/set methods pattern as seen elsewhere in the plugin.

Frencil commented 8 years ago

This was resolved in v0.3.1 (#35)