mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 00:42:54 +02:00
Merge branch 'master_MDL-68223' of https://github.com/golenkovm/moodle
This commit is contained in:
commit
3f79d5461d
@ -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;
|
||||
|
File diff suppressed because one or more lines are too long
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user