Merge branch 'master_MDL-68223' of https://github.com/golenkovm/moodle

This commit is contained in:
Sara Arjona 2020-04-07 13:42:20 +02:00
commit 3f79d5461d
4 changed files with 24 additions and 6 deletions

View File

@ -4381,16 +4381,22 @@ EDITOR.prototype = {
* @method edit_move
*/
edit_move: function(e) {
e.preventDefault();
var bounds = this.get_canvas_bounds(),
canvas = this.get_dialogue_element(SELECTOR.DRAWINGCANVAS),
drawingregion = this.get_dialogue_element(SELECTOR.DRAWINGREGION),
clientpoint = new M.assignfeedback_editpdf.point(e.clientX + canvas.get('docScrollX'),
e.clientY + canvas.get('docScrollY')),
point = this.get_canvas_coordinates(clientpoint),
activeelement = document.activeElement,
diffX,
diffY;
if (activeelement.type === 'textarea') {
return;
}
e.preventDefault();
// Ignore events out of the canvas area.
if (point.x < 0 || point.x > bounds.width || point.y < 0 || point.y > bounds.height) {
return;

View File

@ -4381,16 +4381,22 @@ EDITOR.prototype = {
* @method edit_move
*/
edit_move: function(e) {
e.preventDefault();
var bounds = this.get_canvas_bounds(),
canvas = this.get_dialogue_element(SELECTOR.DRAWINGCANVAS),
drawingregion = this.get_dialogue_element(SELECTOR.DRAWINGREGION),
clientpoint = new M.assignfeedback_editpdf.point(e.clientX + canvas.get('docScrollX'),
e.clientY + canvas.get('docScrollY')),
point = this.get_canvas_coordinates(clientpoint),
activeelement = document.activeElement,
diffX,
diffY;
if (activeelement.type === 'textarea') {
return;
}
e.preventDefault();
// Ignore events out of the canvas area.
if (point.x < 0 || point.x > bounds.width || point.y < 0 || point.y > bounds.height) {
return;

View File

@ -1084,16 +1084,22 @@ EDITOR.prototype = {
* @method edit_move
*/
edit_move: function(e) {
e.preventDefault();
var bounds = this.get_canvas_bounds(),
canvas = this.get_dialogue_element(SELECTOR.DRAWINGCANVAS),
drawingregion = this.get_dialogue_element(SELECTOR.DRAWINGREGION),
clientpoint = new M.assignfeedback_editpdf.point(e.clientX + canvas.get('docScrollX'),
e.clientY + canvas.get('docScrollY')),
point = this.get_canvas_coordinates(clientpoint),
activeelement = document.activeElement,
diffX,
diffY;
if (activeelement.type === 'textarea') {
return;
}
e.preventDefault();
// Ignore events out of the canvas area.
if (point.x < 0 || point.x > bounds.width || point.y < 0 || point.y > bounds.height) {
return;