Index: lams_central/web/includes/javascript/groupDisplay.js =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/includes/javascript/groupDisplay.js,v diff -u -r1.37.2.20 -r1.37.2.21 --- lams_central/web/includes/javascript/groupDisplay.js 15 Oct 2016 00:17:28 -0000 1.37.2.20 +++ lams_central/web/includes/javascript/groupDisplay.js 17 Oct 2016 15:22:07 -0000 1.37.2.21 @@ -175,16 +175,26 @@ // if it was just created if (dialog) { // tell the dialog contents that it was resized - $('.modal-content', dialog).on('resizestop dialogextendmaximize dialogextendrestore', function(){ - var frame = $('iframe', dialog)[0], - win = frame.contentWindow || frame.contentDocument; - win.resizeSequenceCanvas(dialog.width() - 10, dialog.height() - 10); - }); + $('.modal-content', dialog).on('resizestop', resizeSequenceCanvas); + // initial resize + $('iframe', dialog).load(resizeSequenceCanvas); + dialog.modal('show'); } } +function resizeSequenceCanvas(){ + var body = $('.modal-body'), + frame = $('iframe', body); + if (frame.length > 0) { + var win = frame[0].contentWindow || frame[0].contentDocument; + if (win.resizeSequenceCanvas) { + win.resizeSequenceCanvas(body.width(), body.height()); + } + } +} + function showAddLessonDialog(orgID) { showDialog("dialogAddLesson", { 'data' : {