mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 01:46:45 +02:00
MDL-42355 assignfeedback_editpdf - do not start a new comment immediately when deselecting the old comment
This commit is contained in:
parent
6e67d80d50
commit
60b8708076
5 changed files with 52 additions and 4 deletions
|
@ -2368,6 +2368,7 @@ COMMENT = function(editor, gradeid, pageno, x, y, width, colour, rawtext) {
|
|||
Y.later(400, this, this.delete_comment_later);
|
||||
}
|
||||
this.editor.save_current_page();
|
||||
this.editor.editingcomment = false;
|
||||
}, this);
|
||||
|
||||
// For delegated event handler.
|
||||
|
@ -2995,6 +2996,16 @@ EDITOR.prototype = {
|
|||
*/
|
||||
stamps : [],
|
||||
|
||||
/**
|
||||
* Prevent new comments from appearing
|
||||
* immediately after clicking off a current
|
||||
* comment
|
||||
* @property editingcomment
|
||||
* @type Boolean
|
||||
* @public
|
||||
*/
|
||||
editingcomment : false,
|
||||
|
||||
/**
|
||||
* Called during the initialisation process of the object.
|
||||
* @method initializer
|
||||
|
@ -3440,6 +3451,10 @@ EDITOR.prototype = {
|
|||
return;
|
||||
}
|
||||
|
||||
if (this.editingcomment) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.currentedit.starttime = new Date().getTime();
|
||||
this.currentedit.start = point;
|
||||
this.currentedit.end = {x : point.x, y : point.y};
|
||||
|
@ -3541,6 +3556,7 @@ EDITOR.prototype = {
|
|||
comment.init_from_edit(this.currentedit);
|
||||
this.pages[this.currentpage].comments.push(comment);
|
||||
this.drawables.push(comment.draw(true));
|
||||
this.editingcomment = true;
|
||||
} else {
|
||||
annotation = this.create_annotation(this.currentedit.tool, {});
|
||||
if (annotation) {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -2368,6 +2368,7 @@ COMMENT = function(editor, gradeid, pageno, x, y, width, colour, rawtext) {
|
|||
Y.later(400, this, this.delete_comment_later);
|
||||
}
|
||||
this.editor.save_current_page();
|
||||
this.editor.editingcomment = false;
|
||||
}, this);
|
||||
|
||||
// For delegated event handler.
|
||||
|
@ -2995,6 +2996,16 @@ EDITOR.prototype = {
|
|||
*/
|
||||
stamps : [],
|
||||
|
||||
/**
|
||||
* Prevent new comments from appearing
|
||||
* immediately after clicking off a current
|
||||
* comment
|
||||
* @property editingcomment
|
||||
* @type Boolean
|
||||
* @public
|
||||
*/
|
||||
editingcomment : false,
|
||||
|
||||
/**
|
||||
* Called during the initialisation process of the object.
|
||||
* @method initializer
|
||||
|
@ -3440,6 +3451,10 @@ EDITOR.prototype = {
|
|||
return;
|
||||
}
|
||||
|
||||
if (this.editingcomment) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.currentedit.starttime = new Date().getTime();
|
||||
this.currentedit.start = point;
|
||||
this.currentedit.end = {x : point.x, y : point.y};
|
||||
|
@ -3541,6 +3556,7 @@ EDITOR.prototype = {
|
|||
comment.init_from_edit(this.currentedit);
|
||||
this.pages[this.currentpage].comments.push(comment);
|
||||
this.drawables.push(comment.draw(true));
|
||||
this.editingcomment = true;
|
||||
} else {
|
||||
annotation = this.create_annotation(this.currentedit.tool, {});
|
||||
if (annotation) {
|
||||
|
|
|
@ -243,6 +243,7 @@ COMMENT = function(editor, gradeid, pageno, x, y, width, colour, rawtext) {
|
|||
Y.later(400, this, this.delete_comment_later);
|
||||
}
|
||||
this.editor.save_current_page();
|
||||
this.editor.editingcomment = false;
|
||||
}, this);
|
||||
|
||||
// For delegated event handler.
|
||||
|
|
|
@ -171,6 +171,16 @@ EDITOR.prototype = {
|
|||
*/
|
||||
stamps : [],
|
||||
|
||||
/**
|
||||
* Prevent new comments from appearing
|
||||
* immediately after clicking off a current
|
||||
* comment
|
||||
* @property editingcomment
|
||||
* @type Boolean
|
||||
* @public
|
||||
*/
|
||||
editingcomment : false,
|
||||
|
||||
/**
|
||||
* Called during the initialisation process of the object.
|
||||
* @method initializer
|
||||
|
@ -616,6 +626,10 @@ EDITOR.prototype = {
|
|||
return;
|
||||
}
|
||||
|
||||
if (this.editingcomment) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.currentedit.starttime = new Date().getTime();
|
||||
this.currentedit.start = point;
|
||||
this.currentedit.end = {x : point.x, y : point.y};
|
||||
|
@ -717,6 +731,7 @@ EDITOR.prototype = {
|
|||
comment.init_from_edit(this.currentedit);
|
||||
this.pages[this.currentpage].comments.push(comment);
|
||||
this.drawables.push(comment.draw(true));
|
||||
this.editingcomment = true;
|
||||
} else {
|
||||
annotation = this.create_annotation(this.currentedit.tool, {});
|
||||
if (annotation) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue