Index: lams_central/web/includes/javascript/authoring/authoringActivity.js =================================================================== diff -u -r684ddeb9adb6bddc4cdb4f27ddd90e80ba2aa442 -r56793ebe8b7fa9e4eb2d961b13a9f2b8984fb389 --- lams_central/web/includes/javascript/authoring/authoringActivity.js (.../authoringActivity.js) (revision 684ddeb9adb6bddc4cdb4f27ddd90e80ba2aa442) +++ lams_central/web/includes/javascript/authoring/authoringActivity.js (.../authoringActivity.js) (revision 56793ebe8b7fa9e4eb2d961b13a9f2b8984fb389) @@ -810,14 +810,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 -r82cb3e631a089f00c5cf3492074aa0972f2506d0 -r56793ebe8b7fa9e4eb2d961b13a9f2b8984fb389 --- lams_central/web/includes/javascript/authoring/authoringProperty.js (.../authoringProperty.js) (revision 82cb3e631a089f00c5cf3492074aa0972f2506d0) +++ lams_central/web/includes/javascript/authoring/authoringProperty.js (.../authoringProperty.js) (revision 56793ebe8b7fa9e4eb2d961b13a9f2b8984fb389) @@ -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); - } }); }