Skip to content

Commit

Permalink
Merge branch 'MDL-54772-master' of git://github.com/junpataleta/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed Jun 13, 2016
2 parents 88b0045 + cdbdb2f commit d25e8fd
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1555,7 +1555,7 @@ Y.extend(ANNOTATIONSTAMP, M.assignfeedback_editpdf.annotation, {
*/
draw : function() {
var drawable = new M.assignfeedback_editpdf.drawable(this.editor),
drawingregion = this.editor.get_dialogue_element(SELECTOR.DRAWINGREGION),
drawingcanvas = this.editor.get_dialogue_element(SELECTOR.DRAWINGCANVAS),
node,
position;

Expand All @@ -1571,16 +1571,10 @@ Y.extend(ANNOTATIONSTAMP, M.assignfeedback_editpdf.annotation, {
'zIndex': 50
});

drawingregion.append(node);
drawingcanvas.append(node);
node.setX(position.x);
node.setY(position.y);
drawable.store_position(node, position.x, position.y);

// Pass throught the event handlers on the div.
node.on('gesturemovestart', this.editor.edit_start, null, this.editor);
node.on('gesturemove', this.editor.edit_move, null, this.editor);
node.on('gesturemoveend', this.editor.edit_end, null, this.editor);

drawable.nodes.push(node);

this.drawable = drawable;
Expand Down Expand Up @@ -2509,7 +2503,7 @@ var COMMENT = function(editor, gradeid, pageno, x, y, width, colour, rawtext) {
this.draw = function(focus) {
var drawable = new M.assignfeedback_editpdf.drawable(this.editor),
node,
drawingregion = this.editor.get_dialogue_element(SELECTOR.DRAWINGREGION),
drawingcanvas = this.editor.get_dialogue_element(SELECTOR.DRAWINGCANVAS),
container,
menu,
position,
Expand Down Expand Up @@ -2539,7 +2533,7 @@ var COMMENT = function(editor, gradeid, pageno, x, y, width, colour, rawtext) {
color: COMMENTTEXTCOLOUR
});

drawingregion.append(container);
drawingcanvas.append(container);
container.setStyle('position', 'absolute');
container.setX(position.x);
container.setY(position.y);
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -1555,7 +1555,7 @@ Y.extend(ANNOTATIONSTAMP, M.assignfeedback_editpdf.annotation, {
*/
draw : function() {
var drawable = new M.assignfeedback_editpdf.drawable(this.editor),
drawingregion = this.editor.get_dialogue_element(SELECTOR.DRAWINGREGION),
drawingcanvas = this.editor.get_dialogue_element(SELECTOR.DRAWINGCANVAS),
node,
position;

Expand All @@ -1571,16 +1571,10 @@ Y.extend(ANNOTATIONSTAMP, M.assignfeedback_editpdf.annotation, {
'zIndex': 50
});

drawingregion.append(node);
drawingcanvas.append(node);
node.setX(position.x);
node.setY(position.y);
drawable.store_position(node, position.x, position.y);

// Pass throught the event handlers on the div.
node.on('gesturemovestart', this.editor.edit_start, null, this.editor);
node.on('gesturemove', this.editor.edit_move, null, this.editor);
node.on('gesturemoveend', this.editor.edit_end, null, this.editor);

drawable.nodes.push(node);

this.drawable = drawable;
Expand Down Expand Up @@ -2509,7 +2503,7 @@ var COMMENT = function(editor, gradeid, pageno, x, y, width, colour, rawtext) {
this.draw = function(focus) {
var drawable = new M.assignfeedback_editpdf.drawable(this.editor),
node,
drawingregion = this.editor.get_dialogue_element(SELECTOR.DRAWINGREGION),
drawingcanvas = this.editor.get_dialogue_element(SELECTOR.DRAWINGCANVAS),
container,
menu,
position,
Expand Down Expand Up @@ -2539,7 +2533,7 @@ var COMMENT = function(editor, gradeid, pageno, x, y, width, colour, rawtext) {
color: COMMENTTEXTCOLOUR
});

drawingregion.append(container);
drawingcanvas.append(container);
container.setStyle('position', 'absolute');
container.setX(position.x);
container.setY(position.y);
Expand Down
10 changes: 2 additions & 8 deletions mod/assign/feedback/editpdf/yui/src/editor/js/annotationstamp.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Y.extend(ANNOTATIONSTAMP, M.assignfeedback_editpdf.annotation, {
*/
draw : function() {
var drawable = new M.assignfeedback_editpdf.drawable(this.editor),
drawingregion = this.editor.get_dialogue_element(SELECTOR.DRAWINGREGION),
drawingcanvas = this.editor.get_dialogue_element(SELECTOR.DRAWINGCANVAS),
node,
position;

Expand All @@ -58,16 +58,10 @@ Y.extend(ANNOTATIONSTAMP, M.assignfeedback_editpdf.annotation, {
'zIndex': 50
});

drawingregion.append(node);
drawingcanvas.append(node);
node.setX(position.x);
node.setY(position.y);
drawable.store_position(node, position.x, position.y);

// Pass throught the event handlers on the div.
node.on('gesturemovestart', this.editor.edit_start, null, this.editor);
node.on('gesturemove', this.editor.edit_move, null, this.editor);
node.on('gesturemoveend', this.editor.edit_end, null, this.editor);

drawable.nodes.push(node);

this.drawable = drawable;
Expand Down
4 changes: 2 additions & 2 deletions mod/assign/feedback/editpdf/yui/src/editor/js/comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ var COMMENT = function(editor, gradeid, pageno, x, y, width, colour, rawtext) {
this.draw = function(focus) {
var drawable = new M.assignfeedback_editpdf.drawable(this.editor),
node,
drawingregion = this.editor.get_dialogue_element(SELECTOR.DRAWINGREGION),
drawingcanvas = this.editor.get_dialogue_element(SELECTOR.DRAWINGCANVAS),
container,
menu,
position,
Expand Down Expand Up @@ -189,7 +189,7 @@ var COMMENT = function(editor, gradeid, pageno, x, y, width, colour, rawtext) {
color: COMMENTTEXTCOLOUR
});

drawingregion.append(container);
drawingcanvas.append(container);
container.setStyle('position', 'absolute');
container.setX(position.x);
container.setY(position.y);
Expand Down

0 comments on commit d25e8fd

Please sign in to comment.