Index: lams_central/web/includes/javascript/authoring/authoringActivity.js =================================================================== diff -u -rdcb81d1b2bd66f65b38ae9c167bad8d743e03ab0 -r7a19ceb8e410d05b61f130d3416ee06e36be5dd1 --- lams_central/web/includes/javascript/authoring/authoringActivity.js (.../authoringActivity.js) (revision dcb81d1b2bd66f65b38ae9c167bad8d743e03ab0) +++ lams_central/web/includes/javascript/authoring/authoringActivity.js (.../authoringActivity.js) (revision 7a19ceb8e410d05b61f130d3416ee06e36be5dd1) @@ -804,14 +804,19 @@ this.items.attr('uiid', this.uiid); if (this.title) { + console.log(points.arrowAngle); // adjust X & Y, so the label does not overlap with the transition; -// var label = paper.text(points.middleX + ((angle > -45 && angle < 45) || (angle > 135 && angle < 225) ? 20 : 0), -// points.middleY + ((angle > 45 && angle < 135) || angle > 225 || angle < 45 ? -20 : 0), -// this.title) -// .attr(layout.defaultTextAttributes) -// .attr('text-anchor', 'start'); -// -// this.items.append(label); + var label = paper.text(points.middleX, points.middleY, this.title) + .attr(layout.defaultTextAttributes); + labelBox = label.getBBox(), + labelBackground = paper.rect(labelBox.x, labelBox.y, labelBox.width, labelBox.height) + .attr({ + 'stroke' : 'none', + 'fill' : 'white' + }); + label = paper.g(label, labelBackground); + GeneralLib.toBack(labelBackground); + this.items.append(label); } GeneralLib.toBack(this.items); Index: lams_central/web/includes/javascript/authoring/authoringProperty.js =================================================================== diff -u -ra61b6ad192148c0ae514f37a9b488c3a15535ee9 -r7a19ceb8e410d05b61f130d3416ee06e36be5dd1 --- lams_central/web/includes/javascript/authoring/authoringProperty.js (.../authoringProperty.js) (revision a61b6ad192148c0ae514f37a9b488c3a15535ee9) +++ lams_central/web/includes/javascript/authoring/authoringProperty.js (.../authoringProperty.js) (revision 7a19ceb8e410d05b61f130d3416ee06e36be5dd1) @@ -780,7 +780,6 @@ // extract changed properties and redraw the transition var content = $(this).closest('.dialogContents'), transition = content.data('parentObject'), - redrawNeeded = false, newTitle = $('.propertiesContentFieldTitle', content).val(); // validate and save the title @@ -790,7 +789,6 @@ if (transition.branch) { transition.branch.title = newTitle; } - redrawNeeded = true; } else { layout.infoDialog.data('show')(LABELS.TITLE_VALIDATION_ERROR); $('.propertiesContentFieldTitle', content).val(transition.title); @@ -808,13 +806,6 @@ }); } } - - if (redrawNeeded) { - ActivityLib.removeSelectEffect(activity); - transition.draw(); - ActivityLib.addSelectEffect(activity, true); - GeneralLib.setModified(true); - } }); }