Skip to content

Commit

Permalink
Merge pull request #379 from DDMAL/release/3.1.1
Browse files Browse the repository at this point in the history
Neon v3.1.1
  • Loading branch information
JRegimbal authored Jun 18, 2019
2 parents 2d71e4b + 55fc9ad commit af8d1d1
Show file tree
Hide file tree
Showing 58 changed files with 1,510 additions and 2,030 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Bugs

For reporting bugs to Neon, please follow the process outlined on the
[issues wiki page](https://github.com/DDMAL/Neon2/wiki/Issues).
[issues wiki page](https://github.com/DDMAL/Neon/wiki/Issues).

## Branches and Naming

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Neon v3.1.0
Neon v 3.1.1
=====
[![Build_Status](https://travis-ci.org/DDMAL/Neon2.svg?branch=master)](https://travis-ci.org/DDMAL/Neon2)
[![Build_Status](https://travis-ci.org/DDMAL/Neon.svg?branch=master)](https://travis-ci.org/DDMAL/Neon)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![js-semistandard-style](https://img.shields.io/badge/code%20style-semistandard-brightgreen.svg?style=flat-square)](https://github.com/Flet/semistandard)

Expand Down Expand Up @@ -41,7 +41,7 @@ yarn start
Instructions
-----------

Neon has two main modes: viewer and editor. To learn how to use both, [read the instructions on our wiki.](https://github.com/DDMAL/Neon2/wiki/Instructions)
Neon has two main modes: viewer and editor. To learn how to use both, [read the instructions on our wiki.](https://github.com/DDMAL/Neon/wiki/Instructions)

Test
----
Expand Down
4 changes: 2 additions & 2 deletions doc/DragHandler.html
Original file line number Diff line number Diff line change
Expand Up @@ -296,13 +296,13 @@ <h4 class="name" id="~dragInit"><span class="type-signature">(inner) </span>drag
</div>

<nav>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-InfoModule.html">InfoModule</a></li><li><a href="module-Notification.html">Notification</a></li><li><a href="module-SingleEdit_Contents.html">SingleEdit/Contents</a></li><li><a href="module-SingleEdit_EditControls.html">SingleEdit/EditControls</a></li><li><a href="module-SingleEdit_Grouping.html">SingleEdit/Grouping</a></li><li><a href="module-SingleEdit_ResizeStaff.html">SingleEdit/ResizeStaff</a></li><li><a href="module-SingleEdit_Select.html">SingleEdit/Select</a></li><li><a href="module-SingleEdit_SelectOptions.html">SingleEdit/SelectOptions</a></li><li><a href="module-SingleView_DisplayControls.html">SingleView/DisplayControls</a></li><li><a href="module-SingleView_DisplayPanel.html">SingleView/DisplayPanel</a></li><li><a href="module-SingleView_Zoom.html">SingleView/Zoom</a></li><li><a href="module-utils_Color.html">utils/Color</a></li><li><a href="module-utils_Cursor.html">utils/Cursor</a></li><li><a href="module-Validation.html">Validation</a></li><li><a href="module-Warnings.html">Warnings</a></li></ul><h3>Classes</h3><ul><li><a href="DragHandler.html">DragHandler</a></li><li><a href="InsertHandler.html">InsertHandler</a></li><li><a href="module-InfoModule-InfoModule.html">InfoModule</a></li><li><a href="module-Notification-Notification.html">Notification</a></li><li><a href="module-SingleEdit_ResizeStaff-Resize.html">Resize</a></li><li><a href="module-SingleView_DisplayPanel-DisplayPanel.html">DisplayPanel</a></li><li><a href="module-SingleView_Zoom.ViewBox.html">ViewBox</a></li><li><a href="module-SingleView_Zoom-ZoomHandler.html">ZoomHandler</a></li><li><a href="NeonCore.html">NeonCore</a></li><li><a href="NeonView.html">NeonView</a></li><li><a href="SingleEditMode.html">SingleEditMode</a></li><li><a href="SingleView.html">SingleView</a></li><li><a href="SplitHandler.html">SplitHandler</a></li></ul><h3><a href="global.html">Global</a></h3>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-InfoModule.html">InfoModule</a></li><li><a href="module-Notification.html">Notification</a></li><li><a href="module-SingleEdit_Contents.html">SingleEdit/Contents</a></li><li><a href="module-SingleEdit_EditControls.html">SingleEdit/EditControls</a></li><li><a href="module-SingleEdit_Grouping.html">SingleEdit/Grouping</a></li><li><a href="module-SingleEdit_ResizeStaff.html">SingleEdit/ResizeStaff</a></li><li><a href="module-SingleEdit_Select.html">SingleEdit/Select</a></li><li><a href="module-SingleEdit_SelectOptions.html">SingleEdit/SelectOptions</a></li><li><a href="module-SingleView_Zoom.html">SingleView/Zoom</a></li><li><a href="module-TextView.html">TextView</a></li><li><a href="module-utils_Color.html">utils/Color</a></li><li><a href="module-utils_Cursor.html">utils/Cursor</a></li><li><a href="module-Validation.html">Validation</a></li><li><a href="module-Warnings.html">Warnings</a></li></ul><h3>Classes</h3><ul><li><a href="DragHandler.html">DragHandler</a></li><li><a href="InsertHandler.html">InsertHandler</a></li><li><a href="module-InfoModule-InfoModule.html">InfoModule</a></li><li><a href="module-Notification-Notification.html">Notification</a></li><li><a href="module-SingleEdit_ResizeStaff-Resize.html">Resize</a></li><li><a href="module-SingleView_Zoom.ViewBox.html">ViewBox</a></li><li><a href="module-SingleView_Zoom-ZoomHandler.html">ZoomHandler</a></li><li><a href="module-TextView-TextView.html">TextView</a></li><li><a href="NeonCore.html">NeonCore</a></li><li><a href="NeonView.html">NeonView</a></li><li><a href="SingleEditMode.html">SingleEditMode</a></li><li><a href="SingleView.html">SingleView</a></li><li><a href="SplitHandler.html">SplitHandler</a></li></ul><h3><a href="global.html">Global</a></h3>
</nav>

<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.1</a> on Tue May 14 2019 10:56:12 GMT-0400 (GMT-04:00)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.2</a> on Tue Jun 18 2019 11:17:42 GMT-0400 (GMT-04:00)
</footer>

<script> prettyPrint(); </script>
Expand Down
72 changes: 39 additions & 33 deletions doc/InfoModule.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,45 +42,51 @@ <h1 class="page-title">Source: InfoModule.js</h1>
this.neonView = neonView;
// Add info box enable/disable check box
let block = document.getElementById('extensible-block');
block.innerHTML = '&lt;label class="checkbox">Display Info:&amp;nbsp;' +
'&lt;input class="checkbox" id="displayInfo" type="checkbox" checked="checked"/>&lt;/label>' +
block.innerHTML;

InfoModule.neonView = this.neonView;
this.neonView.view.addUpdateCallback(InfoModule.resetInfoListeners);
let label = document.createElement('label');
label.classList.add('checkbox');
label.textContent = 'Display Info: ';
let input = document.createElement('input');
input.classList.add('checkbox');
input.id = 'displayInfo';
input.type = 'checkbox';
input.checked = true;
label.appendChild(input);
block.prepend(label);

this.neonView.view.addUpdateCallback(this.resetInfoListeners.bind(this));
setInfoControls();
}

/**
* Set listeners for the InfoModule.
*/
static infoListeners () {
$('.active-page').find('.neume,.custos,.clef').on('mouseover', InfoModule.updateInfo);
infoListeners () {
$('.active-page').find('.neume,.custos,.clef').on('mouseover', this.updateInfo.bind(this));
}

/**
* Stop listeners for the InfoModule.
*/
static stopListeners () {
$('.neume,.custos,.clef').off('mouseover', InfoModule.updateInfo);
stopListeners () {
$('.neume,.custos,.clef').off('mouseover', this.updateInfo.bind(this));
}

/**
* Restart listeners for the InfoModule.
*/
static resetInfoListeners () {
InfoModule.stopListeners();
InfoModule.infoListeners();
resetInfoListeners () {
this.stopListeners();
this.infoListeners();
}

/**
* Get updated info for the calling element based on its element type.
* Makes calls to NeonCore to get the information necessary.
*/
static async updateInfo () {
async updateInfo (event) {
// For now, since Clefs do not have their own element tag in mei4, there is not a way to select the &lt;g> element
// So we will simply return if ID does not exist for now
let id = this.id;
let id = event.currentTarget.id;
if (id === '') {
$('#neume_info').empty();
console.log('No id!');
Expand All @@ -98,49 +104,49 @@ <h1 class="page-title">Source: InfoModule.js</h1>
case 'neume':
// Select neume components of selected neume
var ncs = element.children('.nc');
var contour = await InfoModule.getContour(ncs);
var contour = await this.getContour(ncs);
if (contour === 'Clivis') {
var attr = await InfoModule.neonView.getElementAttr($(ncs[0])[0].id, 0);
var attr = await this.neonView.getElementAttr($(ncs[0])[0].id, this.neonView.view.getCurrentPage());
if (attr.ligated) {
contour = 'Ligature';
}
}
var pitches = await InfoModule.getPitches(ncs);
var pitches = await this.getPitches(ncs);

pitches = pitches.trim().toUpperCase();
body = 'Shape: ' + (contour === undefined ? 'Compound' : contour) + '&lt;br/>' +
'Pitch(es): ' + pitches;
break;
case 'custos':
attributes = await InfoModule.neonView.getElementAttr(id, 0);
attributes = await this.neonView.getElementAttr(id, this.neonView.view.getCurrentPage());
body += 'Pitch: ' + (attributes.pname).toUpperCase() + attributes.oct;
break;
case 'clef':
attributes = await InfoModule.neonView.getElementAttr(id, 0);
attributes = await this.neonView.getElementAttr(id, this.neonView.view.getCurrentPage());
body += 'Shape: ' + attributes.shape + '&lt;br/>' +
'Line: ' + attributes.line;
break;
case 'staff':
elementClass = 'clef';
var staffDefAttributes = await InfoModule.neonView.getElementStaffDef(id);
var staffDefAttributes = await this.neonView.getElementStaffDef(id);
body = 'Shape: ' + staffDefAttributes['clef.shape'] + '&lt;br/>' +
'Line: ' + staffDefAttributes['clef.line'];
break;
default:
body += 'nothing';
break;
}
InfoModule.updateInfoModule(elementClass, body);
this.updateInfoModule(elementClass, body);
}

/**
* Get the individual pitches of a neume.
* @param {array.&lt;SVGGraphicsElement>} ncs - neume components in the neume.
*/
static async getPitches (ncs) {
async getPitches (ncs) {
var pitches = '';
for (let nc of ncs) {
var attributes = await InfoModule.neonView.getElementAttr(nc.id, 0);
var attributes = await this.neonView.getElementAttr(nc.id, this.neonView.view.getCurrentPage());
pitches += attributes.pname + attributes.oct + ' ';
}
return pitches;
Expand All @@ -150,20 +156,20 @@ <h1 class="page-title">Source: InfoModule.js</h1>
* Get the contour of a neume.
* @param {array.&lt;SVGGraphicsElement>} ncs - neume components in the neume.
*/
static async getContour (ncs) {
async getContour (ncs) {
var contour = '';
var previous = null;
for (let nc of ncs) {
var attributes = await InfoModule.neonView.getElementAttr(nc.id, 0);
var attributes = await this.neonView.getElementAttr(nc.id, this.neonView.view.getCurrentPage());
if (previous !== null) {
if (previous.oct > attributes.oct) {
contour += 'd';
} else if (previous.oct &lt; attributes.oct) {
contour += 'u';
} else {
if (InfoModule.pitchNameToNum(previous.pname) &lt; InfoModule.pitchNameToNum(attributes.pname)) {
if (this.pitchNameToNum(previous.pname) &lt; this.pitchNameToNum(attributes.pname)) {
contour += 'u';
} else if (InfoModule.pitchNameToNum(previous.pname) > InfoModule.pitchNameToNum(attributes.pname)) {
} else if (this.pitchNameToNum(previous.pname) > this.pitchNameToNum(attributes.pname)) {
contour += 'd';
} else {
contour += 's';
Expand All @@ -183,7 +189,7 @@ <h1 class="page-title">Source: InfoModule.js</h1>
* @param {string} title - The info box title.
* @param {string} body - The info box contents.
*/
static updateInfoModule (title, body) {
updateInfoModule (title, body) {
if ($('#displayInfo').is(':checked')) {
$('.message').css('display', '');
$('.message-header').children('p').html(title);
Expand All @@ -200,7 +206,7 @@ <h1 class="page-title">Source: InfoModule.js</h1>
* @param {string} pname - The pitch name.
* @returns {number}
*/
static pitchNameToNum (pname) {
pitchNameToNum (pname) {
switch (pname) {
case 'c':
return 1;
Expand All @@ -226,7 +232,7 @@ <h1 class="page-title">Source: InfoModule.js</h1>
* @param {string} value - the value name.
* @returns {string}
*/
static getContourByValue (value) {
getContourByValue (value) {
for (let [cont, v] of InfoModule.neumeGroups.entries()) {
if (v === value) {
return cont;
Expand Down Expand Up @@ -276,13 +282,13 @@ <h1 class="page-title">Source: InfoModule.js</h1>
</div>

<nav>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-InfoModule.html">InfoModule</a></li><li><a href="module-Notification.html">Notification</a></li><li><a href="module-SingleEdit_Contents.html">SingleEdit/Contents</a></li><li><a href="module-SingleEdit_EditControls.html">SingleEdit/EditControls</a></li><li><a href="module-SingleEdit_Grouping.html">SingleEdit/Grouping</a></li><li><a href="module-SingleEdit_ResizeStaff.html">SingleEdit/ResizeStaff</a></li><li><a href="module-SingleEdit_Select.html">SingleEdit/Select</a></li><li><a href="module-SingleEdit_SelectOptions.html">SingleEdit/SelectOptions</a></li><li><a href="module-SingleView_DisplayControls.html">SingleView/DisplayControls</a></li><li><a href="module-SingleView_DisplayPanel.html">SingleView/DisplayPanel</a></li><li><a href="module-SingleView_Zoom.html">SingleView/Zoom</a></li><li><a href="module-utils_Color.html">utils/Color</a></li><li><a href="module-utils_Cursor.html">utils/Cursor</a></li><li><a href="module-Validation.html">Validation</a></li><li><a href="module-Warnings.html">Warnings</a></li></ul><h3>Classes</h3><ul><li><a href="DragHandler.html">DragHandler</a></li><li><a href="InsertHandler.html">InsertHandler</a></li><li><a href="module-InfoModule-InfoModule.html">InfoModule</a></li><li><a href="module-Notification-Notification.html">Notification</a></li><li><a href="module-SingleEdit_ResizeStaff-Resize.html">Resize</a></li><li><a href="module-SingleView_DisplayPanel-DisplayPanel.html">DisplayPanel</a></li><li><a href="module-SingleView_Zoom.ViewBox.html">ViewBox</a></li><li><a href="module-SingleView_Zoom-ZoomHandler.html">ZoomHandler</a></li><li><a href="NeonCore.html">NeonCore</a></li><li><a href="NeonView.html">NeonView</a></li><li><a href="SingleEditMode.html">SingleEditMode</a></li><li><a href="SingleView.html">SingleView</a></li><li><a href="SplitHandler.html">SplitHandler</a></li></ul><h3><a href="global.html">Global</a></h3>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-InfoModule.html">InfoModule</a></li><li><a href="module-Notification.html">Notification</a></li><li><a href="module-SingleEdit_Contents.html">SingleEdit/Contents</a></li><li><a href="module-SingleEdit_EditControls.html">SingleEdit/EditControls</a></li><li><a href="module-SingleEdit_Grouping.html">SingleEdit/Grouping</a></li><li><a href="module-SingleEdit_ResizeStaff.html">SingleEdit/ResizeStaff</a></li><li><a href="module-SingleEdit_Select.html">SingleEdit/Select</a></li><li><a href="module-SingleEdit_SelectOptions.html">SingleEdit/SelectOptions</a></li><li><a href="module-SingleView_Zoom.html">SingleView/Zoom</a></li><li><a href="module-TextView.html">TextView</a></li><li><a href="module-utils_Color.html">utils/Color</a></li><li><a href="module-utils_Cursor.html">utils/Cursor</a></li><li><a href="module-Validation.html">Validation</a></li><li><a href="module-Warnings.html">Warnings</a></li></ul><h3>Classes</h3><ul><li><a href="DragHandler.html">DragHandler</a></li><li><a href="InsertHandler.html">InsertHandler</a></li><li><a href="module-InfoModule-InfoModule.html">InfoModule</a></li><li><a href="module-Notification-Notification.html">Notification</a></li><li><a href="module-SingleEdit_ResizeStaff-Resize.html">Resize</a></li><li><a href="module-SingleView_Zoom.ViewBox.html">ViewBox</a></li><li><a href="module-SingleView_Zoom-ZoomHandler.html">ZoomHandler</a></li><li><a href="module-TextView-TextView.html">TextView</a></li><li><a href="NeonCore.html">NeonCore</a></li><li><a href="NeonView.html">NeonView</a></li><li><a href="SingleEditMode.html">SingleEditMode</a></li><li><a href="SingleView.html">SingleView</a></li><li><a href="SplitHandler.html">SplitHandler</a></li></ul><h3><a href="global.html">Global</a></h3>
</nav>

<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.1</a> on Tue May 14 2019 10:56:12 GMT-0400 (GMT-04:00)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.2</a> on Tue Jun 18 2019 11:17:42 GMT-0400 (GMT-04:00)
</footer>

<script> prettyPrint(); </script>
Expand Down
Loading

0 comments on commit af8d1d1

Please sign in to comment.