Skip to content

Layers

Pre-release
Pre-release
Compare
Choose a tag to compare
@pettter pettter released this 30 Mar 16:37
· 724 commits to master since this release
913d465

This release introduces layers, which are new score elements in the MEI with some notes missing. The next release will also allow these new layers to contain new notes, added by the annotator. In addition to this major change, there are a number of smaller restructurings, improvements, and general better organisation.

  • Certain things (such as reductions) are more tightly connected each view, rather than being global, both graphically and in the code.
  • We use CSS classes instead of direct style annotations in most cases.
  • Quite a lot of the deprecated codepaths have been moved to js/old.js - all of that code will be removed after this release.
  • How the code navigates the various instances of <graph> nodes, MEI elements and SVG elements has been clarified. In general, by using get_id one reaches a "topmost" ID for whatever element you are looking at (in the case of views and layers), and then various mappings and additional links are used to search for the correct element being sought in the specific situation.
  • A number of globals have also been removed or moved to old.js. In short there is a single MEI that is relevant, and a number of draw_contexts, as well as a number of layer_contexts. These are not the only ones, but the major ones. Some/many of the rest might eventually be moved to be per-view configurations instead.
  • A number of code repetitions have been extracted into separate procedures or functions (new_view_elements, button, add_buttons, onclick_select_functions, finalize_draw_context, note_to_rest, etc.)
  • A bunch of smallish documentation has been added here and there (notably in js/utils.js).

All in all, a major bunch of code, some more complexity, but also some better structure, and better structure for the future. Next up: adding notes!