MDL-46712: Center EditPDF window on browser resize / zoom

This commit is contained in:
Gregory Faller
2014-10-06 14:56:11 +08:00
committed by Jetha Chan
parent dcf18dcec6
commit 83d3fbccb6
5 changed files with 39 additions and 3 deletions
@@ -3224,6 +3224,7 @@ EDITOR.prototype = {
}
this.dialogue.centerDialogue();
this.dialogue.show();
drawingcanvas.on('windowresize', this.resize, this);
},
/**
@@ -3730,6 +3731,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
@@ -4030,6 +4041,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",
File diff suppressed because one or more lines are too long
@@ -3224,6 +3224,7 @@ EDITOR.prototype = {
}
this.dialogue.centerDialogue();
this.dialogue.show();
drawingcanvas.on('windowresize', this.resize, this);
},
/**
@@ -3730,6 +3731,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
@@ -4030,6 +4041,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",
+11
View File
@@ -316,6 +316,7 @@ EDITOR.prototype = {
}
this.dialogue.centerDialogue();
this.dialogue.show();
drawingcanvas.on('windowresize', this.resize, this);
},
/**
@@ -822,6 +823,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
@@ -8,6 +8,7 @@
"graphics",
"json",
"event-move",
"event-resize",
"querystring-stringify-simple",
"moodle-core-notification-dialog",
"moodle-core-notification-exception",