Skip to content

Commit

Permalink
MDL-46712: Center EditPDF window on browser resize / zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-or authored and Jetha Chan committed Oct 6, 2014
1 parent 29507f2 commit d2d568a
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 3 deletions.
Expand Up @@ -3330,6 +3330,7 @@ EDITOR.prototype = {
}
this.dialogue.centerDialogue();
this.dialogue.show();
drawingcanvas.on('windowresize', this.resize, this);
},

/**
Expand Down Expand Up @@ -3836,6 +3837,16 @@ EDITOR.prototype = {
this.currentedit.path = [];
},

/**
* Resize the dialogue window when the browser is resized.
* @public
* @method resize
*/
resize : function() {
this.dialogue.centerDialogue();
return true;
},

/**
* Factory method for creating annotations of the correct subclass.
* @public
Expand Down Expand Up @@ -4124,6 +4135,7 @@ M.assignfeedback_editpdf.editor.init = M.assignfeedback_editpdf.editor.init || f
"graphics",
"json",
"event-move",
"event-resize",
"querystring-stringify-simple",
"moodle-core-notification-dialog",
"moodle-core-notification-exception",
Expand Down

Large diffs are not rendered by default.

Expand Up @@ -3330,6 +3330,7 @@ EDITOR.prototype = {
}
this.dialogue.centerDialogue();
this.dialogue.show();
drawingcanvas.on('windowresize', this.resize, this);
},

/**
Expand Down Expand Up @@ -3836,6 +3837,16 @@ EDITOR.prototype = {
this.currentedit.path = [];
},

/**
* Resize the dialogue window when the browser is resized.
* @public
* @method resize
*/
resize : function() {
this.dialogue.centerDialogue();
return true;
},

/**
* Factory method for creating annotations of the correct subclass.
* @public
Expand Down Expand Up @@ -4124,6 +4135,7 @@ M.assignfeedback_editpdf.editor.init = M.assignfeedback_editpdf.editor.init || f
"graphics",
"json",
"event-move",
"event-resize",
"querystring-stringify-simple",
"moodle-core-notification-dialog",
"moodle-core-notification-exception",
Expand Down
11 changes: 11 additions & 0 deletions mod/assign/feedback/editpdf/yui/src/editor/js/editor.js
Expand Up @@ -325,6 +325,7 @@ EDITOR.prototype = {
}
this.dialogue.centerDialogue();
this.dialogue.show();
drawingcanvas.on('windowresize', this.resize, this);
},

/**
Expand Down Expand Up @@ -831,6 +832,16 @@ EDITOR.prototype = {
this.currentedit.path = [];
},

/**
* Resize the dialogue window when the browser is resized.
* @public
* @method resize
*/
resize : function() {
this.dialogue.centerDialogue();
return true;
},

/**
* Factory method for creating annotations of the correct subclass.
* @public
Expand Down
Expand Up @@ -8,6 +8,7 @@
"graphics",
"json",
"event-move",
"event-resize",
"querystring-stringify-simple",
"moodle-core-notification-dialog",
"moodle-core-notification-exception",
Expand Down

0 comments on commit d2d568a

Please sign in to comment.